Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_beginners thread: Password security


Message #1 by MichaelLopez@E... on Sun, 15 Dec 2002 13:00:54
When I execute a web solution tht connects to an SQL server from Visual 
Studio it runs perfectly. If I call it from a browser I cannot connect to 
the SQL server because the login failed.

What is/are the accepted method(s) for storing database credentials in 
ASP.Net apps? Storing them in the pages themselves is not a solution.

Thanks in advance,

Mike
Message #2 by "Mazen Alzogbi" <lists@a...> on Sun, 15 Dec 2002 16:53:34 +0400
It's useful that you store your Connection string in the web.config file
as:

<appSettings>				
	<add key=" MyConnection" value="user
id=MyUserName;password=MyPwd;initial catalog=myDBName;data
source=MyServer;Connect Timeout=30;Pooling=false;Enlist=false;Max Pool
Size=1"/>
</appSettings>

SqlConnection objConnection = new
SqlConnection(ConfigurationSettings.AppSettings["MyConnection"]);

Please note that I am not using shuting down connection pooling in my
connection string above. If you want to enable it you have to write 

<appSettings>				
	<add key=" MyConnection" value="user
id=MyUserName;password=MyPwd;initial catalog=myDBName;data
source=MyServer;Connect Timeout=30;"/>
</appSettings>

HTH,

Mazen Alzogbi
Editor and .NET Developer
AspElite Member
ArabASP.NET - The #1 Arabic ASP.NET Community Site
www.arabasp.net

-----Original Message-----
From: MichaelLopez@E... [mailto:MichaelLopez@E...] 
Sent: Sunday, December 15, 2002 1:01 PM
To: aspx_beginners
Subject: [aspx_beginners] Password security

When I execute a web solution tht connects to an SQL server from Visual 
Studio it runs perfectly. If I call it from a browser I cannot connect
to 
the SQL server because the login failed.

What is/are the accepted method(s) for storing database credentials in 
ASP.Net apps? Storing them in the pages themselves is not a solution.

Thanks in advance,

Mike

Message #3 by "Hovik Melkomian" <melvik@b...> on Sun, 15 Dec 2002 16:20:31 +0330
I guess u dont save conn password in connection string.
do it and be sure its safe in .NET;

HTH,
Hovik.

----- Original Message -----
From: <MichaelLopez@E...>
To: "aspx_beginners" <aspx_beginners@p...>
Sent: Sunday, December 15, 2002 1:00 PM
Subject: [aspx_beginners] Password security


When I execute a web solution tht connects to an SQL server from Visual
Studio it runs perfectly. If I call it from a browser I cannot connect to
the SQL server because the login failed.

What is/are the accepted method(s) for storing database credentials in
ASP.Net apps? Storing them in the pages themselves is not a solution.

Thanks in advance,

Mike




  Return to Index