How can I protect the use name and password in ConnectionString?
In order to connect to database, I have to put the name and password in ConnectionString, I know the C# program can be uncompiled easily,
how can I the use name and password? thanks!
[187 byte] By [
mycwcgr] at [2007-11-11 6:42:21]

# 2 Re: How can I protect the use name and password in ConnectionString?
I just simply put the connectionstring (together with the user ID and password) in the Application Settings section of the web.config file.
Is it OK?
THL at 2007-11-11 20:49:41 >

# 4 Re: How can I protect the use name and password in ConnectionString?
I just simply put the connectionstring (together with the user ID and password) in the Application Settings section of the web.config file.
Is it OK?
It's a windows application, not ASP.net, so no web.config
# 5 Re: How can I protect the use name and password in ConnectionString?
Windows apps can use config files as well: they're named <filename>.exe.config, where <filename> is the name of your app's .EXE file. The config file should be deployed to the same directory as the .EXE.
# 6 Re: How can I protect the use name and password in ConnectionString?
http://weblogs.asp.net/owscott/archive/2005/07/29/421063.aspx
Thanks Phil, but... how can I implement the same solution for app.config? (winform app)
TIA,
Carlos A. Granitto
MCP
# 7 Re: How can I protect the use name and password in ConnectionString?
Not sure which version of .NET you are using but the following is for 2005:
http://www.developer.com/net/vb/article.php/3500906
http://msdn2.microsoft.com/en-us/library/89211k9b(VS.80).aspx
You could also try the following:
http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=7D1D4954-A530-4329-8CC0-96A0C39AB4B2