Click here to Skip to main content
15,880,469 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello,

I need to have my web application to be accessible on local network. I followed these two articles for publishing my web application on local IIS.

http://www.c-sharpcorner.com/uploadfile/francissvk/how-to-publish-asp-net-web-application-using-visual-studio-2/

http://www.c-sharpcorner.com/uploadfile/11d5d2/how-to-deploy-asp-net-website-in-iis-on-localhost/

My problem is that I get the following error:

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: 50 - Local Database Runtime error occurred. Cannot create an automatic instance. See the Windows Application event log for error details.)

I'm using SQL Server 2014 express edition. Note that the application is fully functioning whe
n I run it from VS 2015 on the same machine.

I also get the following message when I test the connection of the application on IIS.

The server is configured to use pass-through authentication with a built-in account to access the specified physical path. However, IIS Manager cannot verify whether the built-in account has access. Make sure that the application pool identity has Read access to the physical path. If this server is joined to a domain, and the application pool identity is NetworkService or LocalSystem, verify that \$ has Read access to the physical path. Then test these settings again.

What I have tried:

1. Check SQL Server remote connections are enable.
2. Enable TCP/IP on SQL Server Configuration
3. Open port 1433 for inbound/outbound connections.
Posted
Updated 20-Jul-20 9:34am
v3

The problem was with localDB I was using for the ASP Identity part.

I created that database in SQL Server 2014 instead of having a localDB and worked.

Hopes it helps if someone else is having the same problem.
 
Share this answer
 
I'm using Visual Studio 2010 and Visual Studio 2015 Both are Doesn't work in one pc.

so Please Uninstall visual studio Old Version.
 
Share this answer
 
v2
Comments
CHill60 21-Jul-20 8:48am    
OP didn't have two versions of Visual Studio. This comment (I can't call it a Solution) has nothing to do with the original post

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900