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

时间:2013-08-30 05:34:00

标签: c# asp.net .net-4.0 ajaxcontroltoolkit

如何从我的网站上删除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,所以我可以将其删除或从当前网站中删除。

修改 这是程序集Load Trace:

=== 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.

2 个答案:

答案 0 :(得分:2)

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

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

答案 1 :(得分:0)

只需从您的aspx页面中删除此行,并从您的参考中清除ajax控件工具包(查看您的参考资料)

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