代码 运行 在本地没问题,但在 GoDaddy 上实时发布时出错
Code running fine locally but erroring when published live on GoDaddy
“/”应用程序中的服务器错误。
配置错误
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=6.4.4.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: G:\PleskVhosts\dekhoroom.com\httpdocs\web.config Line:
11
Assembly Load Trace: The following information can be helpful to
determine why the assembly 'MySql.Data, Version=6.4.4.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].
如果您在本地开发机器上的 GAC 中有 MySql.Data,它不会在您的 Web 应用程序的 bin 目录中。如果部署的是 bin 目录,则 Sql.Data 将不存在。不要期望托管服务提供商在 GAC 中拥有各种程序集。
所以解决方案是部署您的 Web 应用程序需要的所有程序集。部署 MySql.Data 及其依赖的任何其他程序集,以及您的 Web 应用程序。
出于同样的原因,最好不要在您的 GAC 中安装 ASP.NET MVC,而是简单地引用它并将其与您的 Web 应用程序一起部署。
“/”应用程序中的服务器错误。
配置错误
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=6.4.4.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: G:\PleskVhosts\dekhoroom.com\httpdocs\web.config Line: 11
Assembly Load Trace: The following information can be helpful to determine why the assembly 'MySql.Data, Version=6.4.4.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].
如果您在本地开发机器上的 GAC 中有 MySql.Data,它不会在您的 Web 应用程序的 bin 目录中。如果部署的是 bin 目录,则 Sql.Data 将不存在。不要期望托管服务提供商在 GAC 中拥有各种程序集。
所以解决方案是部署您的 Web 应用程序需要的所有程序集。部署 MySql.Data 及其依赖的任何其他程序集,以及您的 Web 应用程序。
出于同样的原因,最好不要在您的 GAC 中安装 ASP.NET MVC,而是简单地引用它并将其与您的 Web 应用程序一起部署。