1. Always store connection strings in the site's Web.config file. Web.config is very secure. Users will not be able to access web.config from the browser. 2. Do not store connection strings as plain text. To help keep the connection to your database server secure, it is recommended that you encrypt connection string information in the configuration file. 3. Never store connection strings in an aspx page. 4. Never set connection strings as declarative properties of the SqlDataSource control or other data source controls.
Asked In: Many Interviews |