Last post Sep 13, 2014 04:57 AM by Rajani123
Sep 12, 2014 07:00 PM|pelalusa|LINK
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();
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,
Sep 12, 2014 07:29 PM|pelalusa|LINK
Problem solved thanks to this:
I can only guess that the Setup file for my app's predecessor must have disabled the TCP/IP protocol for "SQL Server Network Configuration" because now that I've enabled it in the SQL Server Configuration Manager, all is running fine again.
Sep 13, 2014 04:57 AM|Rajani123|LINK
Great... Congrates :)