I have a connection string at web.config. The data source is ".\SQLEXPRESS"
This works fine on local machine, but when I published the website using vs and an error occurred about sql connection.
I think there is some problem with ".". Then I changed it to an IP Address, after that error occurred on both the local and remote machine.
I think the problem lies on the expression of data source. Can anyone help me resolve this?
The error is:
Server Error in '/' Application. 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)