Hyper-v and sql server connections for web apps

Posted by Rick Ratayczak on Server Fault See other posts from Server Fault or by Rick Ratayczak
Published on 2012-09-09T08:37:08Z Indexed on 2012/09/09 9:39 UTC
Read the original article Hit count: 324

Filed under:
|

I have a physical machine running win8, and two VMs in hyper-v client: 1 web server, 1 sql server. The web server works fantastic. The sql is the one that is giving me the problem. I can connect to it with server explorer in visual studio or management studio just fine, and it's blazing fast.

The problem happens when I use the same connection string I am using in visual studio server explorer in the web.config for an app.

data source=VMSQL1;initial catalog=OtherShell;persist security info=True;user id=OtherShell;password=****;network library=dbmssocn;MultipleActiveResultSets=True;App=EntityFramework

I made sure it was also using tcp-ip, but it doesn't connect with or without the network library part of the connection string.

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)

This is driving my batty for the last two days, any ideas? It fails from the web vm too, but works in management studio with the same connection string.

© Server Fault or respective owner

Related posts about sql-server

Related posts about hyper-v