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)
留言很长:
sqlExpress database file auto-creation error:
The connection string specifies a local sql Server Express instance
using a database location within the application’s App_Data directory.
The provider attempted to automatically create the application
services database because the provider determined that the database
does not exist. The following configuration requirements are necessary
to successfully check for existence of the application services
database and automatically create the application services database:
但我没有使用sql Server Express的连接字符串!
没有改变任何东西并在15分钟后重新启动网站给出:
502 – Web server received an invalid response while acting as a
gateway or proxy server.There is a problem with the page you are looking for,and it cannot be
displayed. When the Web server (while acting as a gateway or proxy)
contacted the upstream content server,it received an invalid response
from the content server.
以前,我可以通过从VS重新发布将网站恢复到正常工作状态.但是在过去的一个小时里,我一直在努力尝试,但我无法让网站重新开始工作.
sql Server Express真的有什么问题?
我的连接字符串部分包含:
<connectionStrings> <add name="DefaultConnection" connectionString="Server=tcp:sabl6h4---.database.windows.net,1433;Database=MVC;User ID=test@sabl6h4---;Password=----;Trusted_Connection=False;Encrypt=True;Connection Timeout=30;" providerName="System.Data.sqlClient" /> <add name="Entities" connectionString="Metadata=res://*/Data.Model1.csdl|res://*/Data.Model1.ssdl|res://*/Data.Model1.msl;provider=System.Data.sqlClient;provider connection string="data source=sabl6h4---.database.windows.net;initial catalog=MVC;user id=test;password=----;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" /> </connectionStrings>
为了确保,我将sabl6h4—.database.windows.net复制并粘贴到SSMS中,并使用登录测试进行连接,它打开数据库没有问题.
一天后:我创建了一个新的azurewebsite并发布了完全相同的项目和相同的web.config.它没有问题,工作正常.几分钟后,发生了完全相同的错误!
再过三个小时:去吃午饭,回来,点击浏览器刷新按钮,网站再次启动.我确信有人在后端的设置中鬼混.