user576838
user576838

Reputation: 875

provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified No fix?

I recently added a second site to my server. That site gives me the dreaded:

System.Data.SqlClient.SqlException: 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 no idea why I am getting this. I've gone through this and this to no avail. This is a new MVC4 application I have at beta.vinformative.com in IIS 7. The other site is a MVC3 site at vinformative.com. It is running fine. Both of their databases have the exact same connection string and they are both on the same SQL server. I've given the same user mapping and role membership for NT Authority\Network Service to both databases.

Here is what I've tried so far:

  1. MSSQLSERVER SQL Server service is running along with SQL Server Browser, and SQL Server Agent
  2. I've added a firewall inbound rule for SQL Server browser
  3. Made sure TCP/IP is enabled in sql server configuration
  4. Added port 1433 TCP to the firewall
  5. Enabled remote connection to db server
  6. Successfully pinged the machine
  7. Used portqry to see the db server on UDP 1434

I can connect to the site locally when I am remotely logged into my server. Furthermore, I have an ELMAH instance in the application for error logging and that is updating the database correctly. I feel like I am taking crazy pills because this should be working and I can't find an outright error. Please help!

Here is my connection string

 <add name="vfContext" connectionString="Data Source=vinformative;Initial Catalog=vf3;Integrated Security=True" providerName="System.Data.SqlClient" />

Upvotes: 1

Views: 2066

Answers (1)

tired
tired

Reputation: 31

Could be EF - see here.
Also, remote access cannot work with "Integrated Security=True" as far as I know, should use "User ID=******;Password=****;Integrated Security=False".

Upvotes: 2

Related Questions