星空网 > 软件开发 > ASP.net

Sql Server 2012 Local DB发布到服务器端后无法访问

项目背景

基于Windows认证的Web application, 通过Visual Studio 2013创建的LocalDB位于App_Data目录下

现象

本地调试没有任何问题。发布到服务器(Windows Server 2008R2, IIS7.5)后,在浏览器访问抛出异常 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. 

原因

LocalDB基于用户模式运行,而IIS默认使用服务帐户,因此失去了对localDB的访问权。

解决办法

在IIS中打开对应的Web应用池属性,设置Identity为特定的域用户,并将Load User Profile的值设为True,程序恢复正常运行




原标题:Sql Server 2012 Local DB发布到服务器端后无法访问

关键词:sql

sql
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

“泡泡机”也能爆单热卖?这款或许适合你:https://www.kjdsnews.com/a/739971.html
eBay预测将有1000万件圣诞礼物被转售!:https://www.kjdsnews.com/a/739972.html
中国海关总署:RCEP实施在即 海关准备就绪:https://www.kjdsnews.com/a/739973.html
英国Tiktok shop开通!怎么找出tiktok带货账号:https://www.kjdsnews.com/a/739974.html
Flipkart怎么开店? Flipkart开店流程教程:https://www.kjdsnews.com/a/739975.html
Flipkart平台怎么样?Flipkart平台介绍:https://www.kjdsnews.com/a/739976.html
武陵山大裂谷周围景点 武陵山大裂谷周围景点图片:https://www.vstour.cn/a/411233.html
南美旅游报价(探索南美洲的旅行费用):https://www.vstour.cn/a/411234.html
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流