简体   繁体   English

Web.config文件错误:无法使用Azure移动服务访问SQL数据库

[英]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.

相关问题 Azure云服务,拒绝使用web.config访问子文件夹 - Azure Cloud Services, deny access to subfolder using web.config Bot Framework 的 web.config 文件中用于连接 Azure SQL Server 数据库的连接字符串 - Connection String for Connecting Azure SQL Server database in Bot Framework's web.config file Azure / WebMatrix web.config 500错误 - Azure/WebMatrix web.config 500 Error C#SQL)如何加密web.config与Azure SQL数据库的连接字符串? (并将密钥导入Azure SQL数据库进行解密吗?) - C# SQL) How to encrypt connectionstring of web.config to Azure SQL database? (and import the key into Azure SQL database for decryption?) Azure SQL数据库与Azure移动服务 - Azure SQL Database Vs Azure Mobile Services WCF WebRole web.config文件错误 - WCF WebRole web.config file error Azure Web App - 托管多个应用程序 - 访问Web API,但它显示来自Web App的web.config的错误 - Azure Web App - Multiple apps hosting - Access Web API but it shows error from web.config of Web App 迁移到Azure Web角色-移植web.config文件 - Migrating to Azure Web Role - porting the web.config file Azure类库访问GetConfigurationSettingValue与web.config - Azure class library access GetConfigurationSettingValue vs. web.config Windows Azure中的web.config - web.config in Windows Azure
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM