A network-releated or instance-specific error occurred while establishing a connection to SQL Server

前端 未结 2 603
刺人心
刺人心 2021-01-02 16:06

I have a simple mvc web site (using the VS internet template) on azurewebsites talking to a SQL Azure database in the same data center. The database at this time is just to

相关标签:
2条回答
  • 2021-01-02 16:30

    Add a <clear/> element as the first element under the connectionstrings element to ensure no strings are being inherited. Also, I assume your Azure SQL DB is set up with proper firewall settings allowing your IP where the ASP.net code is deployed?

    0 讨论(0)
  • 2021-01-02 16:31

    I also had this error. But in my case I did not notice that the connection string was being overwritten by the publish wizard. I fixed the problem by going to the Settings tab in the Publish wizard and unchecking "Use this connection string at runtime (update destination web.config)"

    0 讨论(0)
提交回复
热议问题