Can I connect to a SQL Server instance not hosted by DiscountASP.NET?

Discussion in 'Databases' started by wdanford, May 29, 2007.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Is it possible for my web app to connect to an instance of SQL Server 2005 (Express/Dev) that isn't hosted by DiscountASP.NET? (Or is that off limits?)



    <add name="MyConString" connectionString="Data Source=mydbsite.com\SQL2005,25250;Integrated Security=false;Initial Catalog=MyDb;User ID=user;Password=password" providerName="System.Data.SqlClient" />


    The errorsI'm seeingseem to be from the TCP stack...


    Thanks in advance.
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    You should be able to connect to a remote SQL server from your web application hosted with us; there is no restriction on our end that would stop you from doing this.

    What error are you getting?

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  3. Error message is as follows:

    (provider: TCP Provider, error: 0 - A connection attempt
    failed because the connected party did not properly respond after a
    period of time, or established connection failed because connected
    host has failed to respond.)

    I'm connecting toa namedSQL Server 2005 instanceon a non-standard port. Firewall has been configured to forward. Dynamic ports have been disabled and the server is configured to allow remote connections.

    Thanks for your help.
     
  4. Unfortunately this is difficult for us to diagnose since it is out of our network. If the targeted server is using a different port to connect you will need to specify that port in your connection string.

    You might also want to contact the network administrator who manages that network to obtain more details on their network security settings.
     
  5. Bruce

    Bruce DiscountASP.NET Staff

    Are you sure your connection string is right? It looks kinda strange to me.


    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  6. JorgeR

    JorgeR DiscountASP.NET Staff

    The connection string will not work. You can not connect to an Instance on the webserver as the SQL service is hosted at another box. You will need to use the SQL server name per the example in the control panel of your SQL link. DASP uses the default instance of the SQL Server and express databases are not supported- http://kb.discountasp.net/article.aspx?id=10411


    junior

    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