asp.Net newbie: Sql Connection object usage

Discussion in 'Databases' started by blueprintpm, Jun 13, 2005.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. I am new to ASP.Net - been an ASP developer for a few years, but only using Access as the backend. My question is:what is the best way to configure the SQL Connection object for SQL Server login? Do I include the password in the connection string? If so, how do I set itso that it cannot be read?

    If this is not the best way (which I suspect),what is? I have SQL connection objects on manyof my pages.

    Thanks in advance for any advice -







    Ali Ibarguen
    BluePrint PM, LLC
    blueprintpm.com

    Post Edited (blueprintpm) : 6/13/2005 2:46:21 PM GMT
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    There are many different ways to do this.

    The most common practice is to include connection information in your web.config file and create a library to read it.

    If you store your DB connection in the web.config, you gain

    - security, web.config is not downloadable from the web browser

    - flexibiliy, if you decide to change your DB password, you only change it in 1 file.

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  3. Just what I needed! Great suggestion - works perfectly. -

    Ali Ibarguen
    BluePrint PM, LLC
    blueprintpm.com
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page