- Posted by
Daniel on
6/25/2011 7:31:35 PM
Using the following code a connection to the database can be made by retrieving the connection string information from the web.config.
However, if in the web.config if the connection string doesn't include "Integrated Security=True" the password will not be retrievable. Make sure to include the "Integrated Security=True" on your connection string to SQL Server. The following is a connection string with "Integrated Security=True".