C# 如何从网站中删除ajax工具包
如何从我的网站中删除ajax工具包?我在.NET4.0中开发了我的网站,当我在2.0中编译并运行它时,它在页面加载时出现了这个错误C# 如何从网站中删除ajax工具包,c#,asp.net,.net-4.0,ajaxcontroltoolkit,C#,Asp.net,.net 4.0,Ajaxcontroltoolkit,如何从我的网站中删除ajax工具包?我在.NET4.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. 我认为
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不存在于.NET2.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.
您应该从aspx文件顶部删除此行:
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
只需从您的aspx页面中删除这一行,并从您的参考中清除ajax控件工具包(检查您的参考)
查看您的网页。config@JohnSaunders我在web配置文件中具体看什么?它不包含任何内容,只是我的连接string@DanzaiVer如果您使用母版,也可以查看母版页page@DanzaiVer还要确保您的新构建成功先生,我搜索了整个解决方案,没有“ajax”请再次搜索问题,我编辑了其中一些。成功了,先生。@DanzaiVer您在所有项目中搜索了“AjaxControlToolkit”关键字了吗?
<%@ Register Assembly="AjaxControlToolkit"
Namespace="AjaxControlToolkit" TagPrefix="asp" %>