locked
Troublesome Problem Trying to Connect to local SQL Server DB RRS feed

  • Question

  • User2136700745 posted

    I've been successfully building an ASP.NET Web Forms app for several years, most recently with VS2012.  On my development machine I would run the C# code in Visual Studio and it would connect to the associated DB in SQL Server Express.

    However, yesterday I ran the Setup file of an old Windows VB6 application, which was the predecessor of the one I'm building.  Unfortunately it didn't install properly and it *appears* to have messed something up such that now my ASP.NET 4.0 app can no longer connect to the DB!  Perhaps it corrupted the installed MDAC files?!

    I went to the trouble today of removing all of my development software (VS2012, SQL Server 2014 Express, Telerik controls, Crystal Reports, and even the .NET Frameworks).  I reinstalled everything and even upgraded to VS2013.  BUT exactly the same problem is still occurring!!!

    I'd really like to avoid having to reinstall Windows 8.1 but I don't know what else I can do short of that.

    The exception being thrown is very straightforward.  It's occurring with the 2nd line here:

            System.Data.SqlClient.SqlConnection conn = DataObjects.ConnectionManager.GetConnection();
            conn.Open();

    The exception message is this:
    "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: 28 - Server doesn't support requested protocol)"

    By the way, the application still runs perfectly fine when I run the published version in "wwwroot".  So I somehow doubt that it's an IIS or SQL Server problem.

    I'm hoping someone has a suggestion of how I can fix this,

    Robert

    Friday, September 12, 2014 3:00 PM

Answers

All replies