无法加载文件或程序集'System.Web.Ajax,版本=3.0.31106.0
大家好,
我有一个 .net 应用程序 (vb.net),并且正在使用 ajax 控制工具包。它在我的生产计算机上工作正常,但是当我将其上传到主机(fasthosts)时,我收到此错误:
无法加载文件或程序集'System.Web.Ajax,Version = 3.0.31106.0,Culture = neutral,PublicKeyToken = 28f01b0e84b6d53e'或其依赖项之一。该模块预计包含一个程序集清单。
描述:执行当前 Web 请求期间发生未处理的异常。请查看堆栈跟踪以获取有关错误及其在代码中的来源的更多信息。
异常详细信息:System.BadImageFormatException:无法加载文件或程序集“System.Web.Ajax,Version=3.0.31106.0,Culture=neutral,PublicKeyToken=28f01b0e84b6d53e”或其依赖项之一。该模块预计包含一个程序集清单。
源错误:
当前 Web 请求执行期间生成未处理的异常。有关异常来源和位置的信息可以使用下面的异常堆栈跟踪来识别。
程序集加载跟踪:以下信息有助于确定程序集“System.Web.Ajax,Version=3.0.31106.0,Culture=neutral,PublicKeyToken=28f01b0e84b6d53e”无法加载的原因。
警告:程序集绑定日志记录已关闭。 要启用程序集绑定失败日志记录,请将注册表值 [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) 设置为 1。 注意:程序集绑定失败日志记录会带来一些性能损失。 要关闭此功能,请删除注册表值 [HKLM\Software\Microsoft\Fusion!EnableLog]。
堆栈跟踪:
[BadImageFormatException:无法加载文件或程序集“System.Web.Ajax,Version=3.0.31106.0,Culture=neutral,PublicKeyToken=28f01b0e84b6d53e”或其依赖项之一。该模块预计包含一个程序集清单。] AjaxControlToolkit.ToolkitScriptManager.ApplyAssembly(ScriptReference 脚本, Boolean isComposite) +0 AjaxControlToolkit.ToolkitScriptManager.OnResolveScriptReference(ScriptReferenceEventArgs e)+167 System.Web.UI.ScriptManager.RegisterScripts() +191 System.Web.UI.ScriptManager.OnPagePreRenderComplete(对象发送者,EventArgs e)+113 System.Web.UI.Page.OnPreRenderComplete(EventArgs e)+8698462 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1029
这是我的 web.conf 文件。它非常简单:
<system.web>
<customErrors mode="Off"/>
<compilation debug="true">
<assemblies>
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Web.Extensions.Design, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/></assemblies></compilation></system.web>
有谁知道怎么回事吗?
——比利
HI folks,
I have a .net application (vb.net) and I'm using the ajax control toolkit. It works fine on my production machine but when I upload it to the host (fasthosts) i get this error:
Could not load file or assembly 'System.Web.Ajax, Version=3.0.31106.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e' or one of its dependencies. The module was expected to contain an assembly manifest.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.BadImageFormatException: Could not load file or assembly 'System.Web.Ajax, Version=3.0.31106.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e' or one of its dependencies. The module was expected to contain an assembly manifest.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Web.Ajax, Version=3.0.31106.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e' 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].
Stack Trace:
[BadImageFormatException: Could not load file or assembly 'System.Web.Ajax, Version=3.0.31106.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e' or one of its dependencies. The module was expected to contain an assembly manifest.]
AjaxControlToolkit.ToolkitScriptManager.ApplyAssembly(ScriptReference script, Boolean isComposite) +0
AjaxControlToolkit.ToolkitScriptManager.OnResolveScriptReference(ScriptReferenceEventArgs e) +167
System.Web.UI.ScriptManager.RegisterScripts() +191
System.Web.UI.ScriptManager.OnPagePreRenderComplete(Object sender, EventArgs e) +113
System.Web.UI.Page.OnPreRenderComplete(EventArgs e) +8698462
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1029
Here is my web.conf file. Its very simple:
<system.web>
<customErrors mode="Off"/>
<compilation debug="true">
<assemblies>
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Web.Extensions.Design, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/></assemblies></compilation></system.web>
Does anyone know whats up?
-- Billy
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
发布评论
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
为了使用 ASP.NET AJAX,您需要在计算机上安装 ASP.NET AJAX 框架,其中包含导致错误的 DLL。
您的托管公司很可能没有安装 ASP.NET AJAX。
In order to use ASP.NET AJAX, you would have installed the ASP.NET AJAX framework on your machine, which includes this DLL that is causing the error.
The chances are that your hosting company doesn't have ASP.NET AJAX installed.