Reputation: 156
I am getting “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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)” Error when connection throw ASP.NET ONLY . if I try to connect windows application I am able to connect and retrieve values. I am unable to find any solution Thanks
Upvotes: 2
Views: 459
Reputation: 10184
Sometimes the simplest things can be the trickiest to discover. I would check to ensure nothing as simple as a typo exists in the name of the SQL Server provided to the ASP.NET application. Make sure that value does, in fact, match that supplied to the Windows application.
If the name is verified correct, I would then make sure that the outbound connection from the ASP.NET application isn't inadvertently trying to go through a proxy server.
Upvotes: 1