locked
Can't make local IIS (2003) connection to SQL 2005. ASP.NET C#. Works Remotely. RRS feed

  • Question

  • I have a laptop running MS Visual Studio 2008. I have a Windows Server 2003 with SQL 2005 Standard running IIS.  My ASP providers are all done via SQL and not XPRESS.

    I am able to run my web application in Visual Studio with a remote connection to the SQL Server using the following connection string in my web.config.

        add name="CPB" connectionString="Data Source=[removed IP];Initial Catalog=BCS;User ID=[REMOVED USERNAME];password=[REMOVED PASSWORD];" providerName="System.Data.SqlClient"

    So when I view my default.aspx in browser via Visual Studio, I'm presented with a nice login screen that work correctly with the SQL 2005 server over the network.

    However when I upload my code to the server it does not work correctly.  As soon as I put my credentials into the login I get the following message.

    A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

    I have the firewall off on the server.  Works over the network anyways. I have tried impersonation but that doesn't seem to be working.  No matter what I do, I can not get IIS to connect to the SQL server.  The instance is MSSQLSERVER.  I'm running the website with it's own application pool.  I have tried changing the AppPool login credentials as well with no luck.  

    I have the SQL Browser running.

    I have been at t his for Days. Isn't there a nice manual out there that shows you exactly how to migrate a web application from Visual Studio w/ Express to a production environment?

    • Moved by Keshav Ramarao Wednesday, May 12, 2010 10:07 PM Web deployment question, not SQL Server Migration question, redirecting. (From:SQL Server Migration)
    Monday, May 10, 2010 7:55 PM