Hi all,

Apologies to be a pain but I'm relativeley new to .net programming and I need a little assistance please.

I have created a login and registration pages using the control for .net 2.0 and tested locally I can add users and login to the site.

However, once published to the server I cannot register or login as I get this message

"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: 26 - Error Locating Server/Instance Specified)"

I have tried to understand the problem but cannot make any progress. There are a lot of reference to the connection string in the webconfig but I haven't added anything that wasn't there before.

Can anyone spend a little time to help me understand what I have done wrong?

Thanks all

HI,
If you use Sql Server Management studio then:

open.
Connect to the remote server.Right click on the server instance.Select properties.
Click Connections.Check to allow remote connections to this server.

If you use Express or Developer edition then follow the below steps:

Click Start -->> Programs -->> Microsoft SQL Server 2005 -->>
Configuration Tools -->> SQL Server Surface Area Configuration.
Now click Surface Area Configuration for Services and Connections.
Now expand Database Engine, click Remote Connections, click Local and remote connections, click the appropriate protocol to enable for your environment, and then click Apply.

Restart MSSQLSERVER service from
Start -->> Control Panel -->> Administrative Tools -->>
Service -->> Select MSSQL Server -->> Restart Service

If problem does not resolved than contact with your server admin.

This article has been dead for over six months. Start a new discussion instead.