DB connection string

Discussion in 'Databases' started by NoBullMan, Jan 9, 2008.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. I copied the connection string supplied on the database manager page of discountasp and I still get the following error:

    An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

    The connection string in web.config is:

    <connectionStrings>
    <add name="cs" connectionString ="Data Source=tcp:sql2k511.discountasp.net;Initial Catalog=SQL2005_xxxxx_dbname;User ID=SQL2005_xxxxx_dbname_user;Password=ThePassword;" />
    </connectionStrings>

    I tried:


    <connectionStrings>
    <add name="cs" connectionString ="server=sql2k511.discountasp.net;database=SQL2005_xxxxxx_dbname;uid=SQL2005_xxxxxx_dbname_user;pwd=ThePassword;" />
    </connectionStrings>
     
  2. Try this:

     
  3. Thanks for the info. I tried it but it still gives me the same error.
     
  4. OK, my mistake. It worked. I had tcp:tcp:
     
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