[英]Web.config file error: Unable to access SQL database with Azure mobile services
I'm working with a Xamarin.iOS app.I imported a database from one subscription to another in the Azure portal. 我正在使用Xamarin.iOS应用程序。我在Azure门户中将数据库从一个订阅导入到另一个订阅。 I then opened up the Web Deploy.pubxml file and updated the
Destination Path
to point to the new server and new database. 然后,我打开Web Deploy.pubxml文件,并更新了“
Destination Path
以指向新服务器和新数据库。
I haven't updated anything in the web.config file. 我还没有更新web.config文件中的任何内容。 When I try to log into my app, I get the following error in the logs:
当我尝试登录我的应用程序时,在日志中出现以下错误:
IIS Detailed Error - 500.0 - Internal Server Error
IIS was not able to access the web.config file for the Web site or application. This can occur if the NTFS permissions are set incorrectly
The authenticated user does not have permission to use this DLL
The connectionString is still pointing to the old data in the web.config file. connectionString仍指向web.config文件中的旧数据。 Does this need to change?
这需要改变吗? If yes, where do I retrieve the new connectionString from?
如果是,我从哪里检索新的connectionString?
After a little more debugging, I realized that there were some missing assemblies being referenced in the web.config file. 经过更多调试后,我意识到web.config文件中引用了一些缺少的程序集。 The package was missing from the project, yet it was still being referenced in the web.config file.
该项目中缺少该软件包,但仍在web.config文件中对其进行引用。
This library was missing: 该库丢失:
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35"/>
So I added the System.Web.Mvc library to the project and that updated the web.config file. 因此,我将System.Web.Mvc库添加到项目中,并更新了web.config文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.