Getting sql connection error when trying to login

I have a login page that works in my local development environment. When I push the site to the webserver, I get this error when I try to login with the asp.net access control.

An error occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure can be caused by SQL Server not allowing remote connections under default settings. (Provider: SQL Network Interfaces, Error: 26 - Server / Instance Locating Error)

I can't figure out why it doesn't work on the server. Do I need to add or change something in the web.config file?

0


a source to share


4 answers


This support article can help . It could also be a firewall issue or an authentication issue on a fresh installation (but the error message makes this less likely).



+2


a source


To resolve error 26 on sql server, you need to follow below steps.

On the Server System 1. In Surface Configuration Manager - open Remote Connections. 2. Add port 1433 and 1434 to firewall not as an n exception. 3. Open port 1433 on the router for WAN access. 4. Add the IP address of the client computer as an exception to your anti-virus, or allow the local network settings in the anti-virus. 5. Now try to check if the client and server are connected with each other. for this type "ping the IP address of the remote system" at startup, and if a response is received then do the same for the server machine. If a response is received from both machines.



Open Sql Server and try to connect to a remote computer which allows remote connections to use its IP address. U will definitely connect to the server machine.

Watch this video

+1


a source


Make sure TCP / IP is enabled on SQL Server. Named pipes and TCP / IP are disabled by default for some reason. Also make sure you are trying to connect to the correct instance (you may be using. / SQLEXPRESS locally and the SQL server is set to the default instance). Finally, make sure the database you are trying to connect to exists on the server.

0


a source


It has something to do with my laptop. The only thing I can think of is the built-in Windows firewall. I disabled Windows Firewall but I still have the same problem. Can anyone think of other local processes that might be causing this problem?

0


a source







All Articles