错误:50 - 发生本地数据库运行时错误。在本地IIS上发布ASP.NET应用程序时 [英] Error: 50 - local database runtime error occurred. When publishing ASP.NET application on local IIS

查看:80
本文介绍了错误:50 - 发生本地数据库运行时错误。在本地IIS上发布ASP.NET应用程序时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



我需要让我的网络应用程序可以在本地网络上访问。我按照这两篇文章在本地IIS上发布我的Web应用程序。



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 /



我的问题是我收到以下错误:



建立与SQL Server的连接时发生与网络相关或特定于实例的错误。服务器未找到或无法访问。验证实例名称是否正确,以及SQL Server是否配置为允许远程连接。 (提供程序:SQL网络接口,错误:50 - 发生本地数据库运行时错误。无法创建自动实例。请参阅Windows应用程序事件日志以获取错误详细信息。)



我正在使用SQL Server 2014快递版。请注意,应用程序完全正常运行

n我在同一台计算机上从VS 2015运行它。



我还收到以下消息我在IIS上测试应用程序的连接。



服务器配置为使用内置帐户的传递身份验证来访问指定的物理路径。但是,IIS管理器无法验证内置帐户是否具有访问权限。确保应用程序池标识具有对物理路径的读访问权限。如果此服务器已加入域,并且应用程序池标识为NetworkService或LocalSystem,请验证\ $是否具有对物理路径的读取权限。然后再次测试这些设置。



我尝试过:



1.检查SQL Server远程连接是否已启用。

2.在SQL Server配置上启用TCP / IP

3.为入站/出站连接打开端口1433。

解决方案

具有物理路径的读取权限。然后再次测试这些设置。



我尝试过:



1.检查SQL Server远程连接是否已启用。

2.在SQL Server配置上启用TCP / IP

3.为入站/出站连接打开端口1433。

问题在于我使用的是用于ASP身份部分的localDB。



我在SQL Server 2014中创建了该数据库而不是localDB并且工作了。



如果其他人遇到同样的问题,希望能有所帮助。


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.

解决方案

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.


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.


这篇关于错误:50 - 发生本地数据库运行时错误。在本地IIS上发布ASP.NET应用程序时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆