When I run my website under local IIS instead of embedded IIS express I got the following error when accessing database (mdf file at app_data)
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)
Here the connection string:
Data Source=(LocalDB)\v11.0;AttachDbFilename=C:\Sources\Local\WebApplication1\WebApplication1\App_Data\aspnet-WebApplication1-20140226022052.mdf;Integrated Security=True
From Visual Studio and IIS Express I could connect to that database:
https://db.tt/rBXiwyA5
But the issue is that I need to have access to deployed application from another computer and IIS Express doesn't allow remote connections. That is why I was forced to use Local IIS.
Thank you for any advises!
you may need to double escape the \
"Data Source=(LocalDB)\v11.0;Integrated Security=true"
Unable to connect to localDB in VS2012 – "A network-related or instance-specific error occurred while establishing a connection to SQL Server..."
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With