Problem with C# connection object and SQL2k database

Discussion in 'ASP.NET 2.0' started by srhea, Dec 8, 2006.

  1. Hi,

    I am having a problem with a web service I have created using C#.NET with Enterprise Library (Janurary 2006) and WSE3.0 installed. Specifically, I am trying to create a series of transaction-based calls in my code and from everything I can determine, this means that I need to create a connection object. Everything works just fine when I run the method in question against one of the SQL2000 servers here at work, but when I change the default connection string to my discountasp SQL2000 database, I get a nasty error. However, that being said, my connection string *should* be fine because another method which does not utilize the connection object works like a champ.

    Anyway, without further ado, here's an example of my problem:


     
  2. Bruce

    Bruce DiscountASP.NET Staff

    the error indicate that your app is trying to use Named pipe to connect. named pipe does not work over WAN.


    Try change the connection string to


    <add name="DefaultConn" connectionString="Data Source=tcp:mssql08.discountasp.net;Initial Catalog=DB_999999_mydb;User Id='myid';Password='p4ssw0rd'" providerName="System.Data.SqlClient" />


    Change in BOLD


    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  3. I could have sworn that I tried that, but that did the trick. Thanks!
     

Share This Page