2015-09-23 81 views
0

'/'應用程序中的服務器錯誤。代碼在本地運行良好,但在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].

+0

那麼,你有'MySql.Data'程序集部署到託管? – torvin

+0

如何添加godady? –

回答

1

如果是你,你的本地開發機器上,在你的GAC有MySql.Data,它不會在你的Web應用程序的bin目錄。如果它是被部署的bin目錄,Sql.Data將不會在那裏。不要指望託管服務提供商在GAC中擁有各種組件。

所以解決方案是部署您的Web應用程序需要的所有程序集。部署MySql.Data以及它所依賴的任何其他程序集以及您的Web應用程序。

出於同樣的原因,不要在您的GAC中安裝ASP.NET MVC,而只是簡單地引用它並將其與Web應用程序一起部署。

相關問題