Showing posts with label Asp.net ServerControls. Show all posts
Showing posts with label Asp.net ServerControls. Show all posts

Friday, 16 January 2009

Asp.Net encrypt connection string in web config

Quick note on how to encrypt the Connection string in the web.config for future reference
Encrypt the Connection string :
aspnet_regiis -pef "ConnectionString" "c:\path\to\website"

Grant Access to IIS to the key
aspnet_regiis -pa "NetFrameworkConfigurationKey" "NT Authority\Network Service"

note aspnet_regiis is in the .net framework directory for the version of .net that you are using

Friday, 15 June 2007

Problems with Properties showing in Property Editor with custom web server controls

I was creating a custom web sever control which was inherited from CompositeControl, I had removed a couple of editor properties, I then noticed that some properties were not being shown in the property editor after you switched between source and design view of a web page. To fix this I had to add in a new property, compile and use it, then take the new property back out again.
I also had to take the reference of the object out of the web page and stick it back in again.
All in all a pain in the bottom, and a waste of time!

Dear MS why did you make the development of web controls so annoying, like having to put a new control on the screen everytime you make a change, and debugging the component in design mode what were you thinking!