简体   繁体   English

ASP.NET应用程序生产服务器的SQL连接错误

[英]ASP.NET application SQL connection error from production server

During development on my local computer, I am able to connect to the remote (Production) SQL Server with no issues, but when I deploy the application to said production server, I get this error: 在我的本地计算机上进行开发期间,我能够毫无问题地连接到远程(生产)SQL Server,但是当我将应用程序部署到所述生产服务器时,我收到此错误:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. 建立与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. 验证实例名称是否正确,以及SQL Server是否配置为允许远程连接。 (provider: SQL Network Interfaces, error: 52 - Unable to locate a Local Database Runtime installation. Verify that SQL Server Express is properly installed and that the Local Database Runtime feature is enabled. (提供程序:SQL网络接口,错误:52 - 无法找到本地数据库运行时安装。验证是否已正确安装SQL Server Express并且已启用本地数据库运行时功能。

I have done I believe all the things suggested to resolve this problem with no success. 我已经完成了我相信建议解决这个问题的所有事情都没有成功。 Please help if you can. 如果可以的话请帮忙。 Thanks! 谢谢!

I figured out the answer to my issue. 我想出了我的问题的答案。 I am using ASP.NET Identity and it created it's own connection but I wanted to use my own database. 我正在使用ASP.NET Identity,它创建了自己的连接,但我想使用自己的数据库。 When I deployed my application that connection was broken. 当我部署我的应用程序时,连接断开了。 Changed the Identity connection to my own database connection and all worked as expected. 将Identity连接更改为我自己的数据库连接,并且所有工作都按预期工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM