views:

45

answers:

2

Is there a way where I can set the .NET ApplicationServices connection string in the code behind? Instead of having plain text in my web.config? Or can I just put the encrypted value there and then decrypt and pass it again?

Thanks!

+2  A: 

You can encrypt settings in your config file. Here is the article on MSDN on how.

Nick
Thanks that did the job.
Ryan
+1  A: 

You can create/implement/use a ProtectedConfigurationProvider to transparently decrypt the configuration settings.

Benjamin Podszun