如何从网站上删除ajax工具包

本文关键字:删除 ajax 工具包 网站 | 更新日期: 2023-09-27 18:29:32

如何从我的网站上删除ajax工具包?我在.net 4.0中开发了我的网站,当我在2.0中编译并运行它时,它在页面加载时会出现这个错误。

Could not load file or assembly 'AjaxControlToolkit' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded. 

我认为是Ajax导致了我的错误,因为Ajax没有出现.net 2.0

我没有在我的网站上使用ajax,所以我可以删除它或从当前网站上删除它。

编辑这是程序集加载跟踪:

=== Pre-bind state information ===
LOG: User = PJLIMAIN'aslaure
LOG: DisplayName = AjaxControlToolkit
 (Partial)
LOG: Appbase = file:///C:/Users/aslaure/Desktop/IACS References/PJLhuillier.IACS/PJLhuillier.IACS/
LOG: Initial PrivatePath = C:'Users'aslaure'Desktop'IACS References'PJLhuillier.IACS'PJLhuillier.IACS'bin
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:'Users'aslaure'Desktop'IACS References'PJLhuillier.IACS'PJLhuillier.IACS'web.config
LOG: Using machine configuration file from C:'Windows'Microsoft.NET'Framework'v2.0.50727'config'machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Users/aslaure/AppData/Local/Temp/Temporary ASP.NET Files/root/70cff49e/7a1e4609/AjaxControlToolkit.DLL.
LOG: Attempting download of new URL file:///C:/Users/aslaure/AppData/Local/Temp/Temporary ASP.NET Files/root/70cff49e/7a1e4609/AjaxControlToolkit/AjaxControlToolkit.DLL.
LOG: Attempting download of new URL file:///C:/Users/aslaure/Desktop/IACS References/PJLhuillier.IACS/PJLhuillier.IACS/bin/AjaxControlToolkit.DLL.
ERR: Failed to complete setup of assembly (hr = 0x8013101b). Probing terminated.

如何从网站上删除ajax工具包

您应该从aspx文件的顶部删除这一行:

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

只需从aspx页面中删除这一行,并从您的参考文件中清除ajax控制工具包(检查您的参考)

<%@ Register Assembly="AjaxControlToolkit"
 Namespace="AjaxControlToolkit" TagPrefix="asp" %>