asp.net - Web 主机上的配置错误,无法加载文件或程序集
问题描述
请我想解决这个问题,我做了 .aspx Web 应用程序,当我尝试通过 GearHost 发布它时,我遇到了这个问题
Server Error in '/' Application.
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Could not load file or assembly 'MySql.Data, Version=8.0.18.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The system cannot find the file specified.
Source Error:
An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
Source File: C:\home\site\wwwroot\web.config Line: 14
Assembly Load Trace: The following information can be helpful to determine why the assembly 'MySql.Data, Version=8.0.18.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' could not be loaded.
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.3429.0
我的 web.config 是
<?xml version="1.0"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<appSettings>
<add key="ValidationSettings:UnobtrusiveValidationMode" value="None"/>
</appSettings>
<system.web>
<customErrors mode="Off"/>
<compilation debug="true" targetFramework="4.5">
<assemblies>
<add assembly="MySql.Data, Version=8.0.18.0, Culture=neutral, PublicKeyToken=C5687FC88969C44D"/>
</assemblies>
</compilation>
<httpRuntime targetFramework="4.5"/>
</system.web>
</configuration>
请任何人都可以帮助我
解决方案
推荐阅读
- javascript - Node 和 React js 中 Web 应用程序的消息翻译方法
- python - 完善如何等待外部依赖
- swift - Apple 开发者 SwiftUI 教程的预览问题 - 与 UIKit 的框架集成接口
- r - 在具有不同条数的ggplot堆叠条形图中保持恒定条形宽度
- xslt-1.0 - 如何在页面 xsl fo 上将行保持在一起?
- perl - 如何在 perl 中运行多个测试脚本,并从另一个脚本中提供参数?
- android - 收入猫购买
- python - 使用 input() 创建一个程序以在 python 中绘制 excel 数据以选择文件
- mysql - MySQL查询返回错误的行数?
- python - 如何将字符串转换为日期格式