Why I am not able to connect to remote server from asp.net website whereas it is connecting from SSMS
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)
I tried all the possible solution suggested in this link
I checked Followings as given in the above article, they are enabled/running
- SQL Server is up and running.
- TCP/IP enabled in SSCM
- Opened port in Windows Firewall
- Remote Connection enabled
- SQL Server Browser Service running
I searched for sqlbrowser.exe but it is not found in the given directory.
Finally I switched off Windows Firewall but still it is not working.
UPDATE: we are connecting to sql server using a custom user created on sql server (not sa ) I have user account credential to Remote connect to server. I tried to change LogOn to my credentials (administrator) . in Windows Services SQL Server (MSSQlServer) and SQL Server Agent (MSSQL Server) services.