Connection String (Works on DiscountAsp doesn't work Locally)

Discussion in 'Databases' started by teachsmarto, Feb 25, 2005.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. teachsmarto

    teachsmarto Guest

    Hello,

    I am using the following MS SQL Server connection string that works fine when I upload to the DiscountASP servers but errors with "Can't find server or don't have access" message when I try to debug from my local computer. I can access DiscountASP's SQL server just fine in Enterprise Manager so I am lead to belive it is not a sercurity or firewall issue. Does anyone see any problems with this connection string?




    System.Data.SqlClient.SqlConnection myConn = new System.Data.SqlClient.SqlConnection("server=mssql07.discountasp.net;database=db_126363;uid=MyUserName;pwd=########;");





    I would just like to be able to debug my website locally so that I can use breakpoints and also don't have a stechy page online.





    Thanks.
     
  2. teachsmarto

    teachsmarto Guest

    Thanks for the reply bruce.

    I have tried many different connection strings, and I am using a FQDN and I have tried using an IP address also. I ran etherreal and I see traffic going to the discountASP SQL server, so I know it is at least talking to it. Unfortunatly I don't know much about the traffic that goes to a SQLserver so I can't really diagnose at the Packet level unless I really read up on SQL server, which at the present time I don't really want to :)

    I havn't tried this from my home computer yet, just at the office. We have ISA server here and I am using MS Firewall Client. (My account is setup for full access on ISA andI do not see any blocked traffic from my account/ip to idicate that it is a port blocking issue) Do you think that IIS on my local XP local machine just isn't using that correctly? Like I said before though Enterprise Manager works fine, and so does everything else.



    Welp, if anyone else has any thoughts or has experienced similar problems, please letme know!

    Thanks.
     
  3. Bruce

    Bruce DiscountASP.NET Staff

    That's very strange, in general, the .NET SQL driver should talk to the SQL server directly through TDS.

    If it works w/ EM, you should be able to connect through .NET.

    The error you are seeing definitely is cause by the application failing to connect to the server. I suggest you check the connection string and make sure you use FQDN rather than just the name.

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  4. Bruce

    Bruce DiscountASP.NET Staff

    OK. ISA may be the problem.

    ISA has lvl7 firewalling capability, so i could look like you can establish connection but ISA would still block it.

    I do not think this is an IIS config issue because you should not get this error if IIS is misconfig.

    I suggest you try it on your home network and see if it works, if it does, you can safely assume the problem is on your office network.

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
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