Azure website cannot access Azure DB

隐身守侯 提交于 2019-11-27 23:49:00

It appears that your application is expecting to be able to set up a database using an attached file in your project on a local instance of SQL Server Express. The key line in your error message is:

The connection string specifies a local Sql Server Express instance using a database location within the application's App_Data directory.

You probably need to update the connection string in your configuration file to match the connection string in your Azure website. This information can be obtained in the Azure dashboard once you set up the website with a SQL Server, and be set through the same dashboard.

Here's good instructions for doing that: http://blog.davidebbo.com/2012/09/managing-database-connections-in-azure.html

I know this is a really old post, but I just battled with the same issue...

I had the same issue and although I don't understand it, I have found that if I am currently logged in (on my site, not Azure console), I need to log out and then back in again and this database error goes away. It makes no sense to me, but it is what works for me after I deploy. I have had many times where I have deployed and everything works great (no need to logout/login). Sometimes it jumps into this mode. Not sure what is going on there.

It has nothing to do with the connection strings in your web.config - they are all being transformed properly.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!