【问题标题】:ASP.Net error on server?服务器上的 ASP.Net 错误?
【发布时间】:2016-09-09 19:55:42
【问题描述】:

我有一个从 SQL 数据库中提取数据的 ASP.Net 站点,它可以在我的本地计算机上的 Visual Studio 中运行,但是当我将它上传到我在 somee.com 的网络空间时,当我尝试访问时出现错误页面。

这里是错误页面:

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=6.9.8.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: d:\DZHosts\LocalUser\bman262\www.brandonsLoginTest.somee.com\riviera horticulture\web.config    Line: 9 

Assembly Load Trace: The following information can be helpful to determine why the assembly 'MySql.Data, Version=6.9.8.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.6.1069.1

据我所知,我不认为

mysql.data 

Web 配置中的引用正在加载。

有人帮忙吗?

谢谢

【问题讨论】:

    标签: c# mysql asp.net server


    【解决方案1】:

    您需要确保在部署网站时包含缺少的 DLL。如果您使用 VS 部署工具,它应该会为您执行此操作。

    检查您的 Publish 文件夹,看看它是否在那里。

    【讨论】:

    • 感谢您的帮助,可能缺少哪些 DLL 或者我应该尝试添加哪些 DLL?如果它在那里,它会在我的发布文件夹中吗?除了我的网站页面和资源之外,我似乎看不到任何其他内容?
    • 不知道 DLL 的确切名称,但由于 MySqlData 是缺少的数据空间,我会冒险猜测它是缺少的主要 MySql DLL。如果您在发布文件夹中没有看到除您自己的文件之外的任何内容,那么您的发布听起来好像工作不正常。你应该也有一些微软的东西
    • 您好,我环顾了一下您所说的,发现我使用的是开发机器上的 dll 而不是文件本地的 dll,我下载了 sql dll 并将它们本地添加到我的项目文件夹作为参考。这解决了一个未提及的问题,我的项目无法在其他机器上运行。它还改变了我在服务器上出现的错误。现在我已将 dll 添加到我的文件中并使用该引用服务器说我的代码有错误而不是 web.config 它说当我使用使用 mysql.data 时找不到 mysql.data
    • @Bman262 您当然需要添加对您要使用的任何 DLL 的引用。这样,发布向导就知道在创建包时要包括什么。不过,您实际上并不需要将它们复制到您的项目中,正如我所说,发布向导会为您添加它们。
    • 好的,在这种情况下,发布向导似乎出于某种原因没有这样做。我可能会错误地发布我的项目吗?我右键单击我的解决方案并按发布然后我发布到文件?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-04-12
    • 1970-01-01
    • 2013-04-16
    相关资源
    最近更新 更多