views:

85

answers:

1

i have a website built in asp.net connecting to a sql 2000 db. within my web.config file, i have a connection string referencing a DSN. in order for my db connection to work i have to include the username and password within the string. for security reasons, is there any way to connect to my db without displaying the username and password. maybe a method to encrypt the information?? the trusted connection string method did not work for me.

current method

Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;

trusted method (did not work in my server environment)

Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=SSPI;
+2  A: 

You can encrypt connection strings in your web.config file.

See How To: Secure Connection Strings When Using Data Source Controls on MSDN.

womp
Good one. You can also (as a further step) restrict access to config files for all users except the asp user (and admins perhaps).
Patrick