2

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

2
  • What credentials are you providing with the connection string? Commented Apr 23, 2012 at 7:26
  • am able to ping it; i double checked my firewall i also added firewall exception; my sql server is in a local machine; no firewall in that machine(i removed all); Commented Apr 23, 2012 at 7:41

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

2 Comments

It is a MVC 3 application that make any probleam?
Really shouldn't make any difference. Sounds very much like a basic connectivity issue to me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.