我继承了一个asp.net 3.5解决方案,我遇到麻烦让它工作.我不断收到错误:
Could not load file or assembly ‘Microsoft.Web.Extensions,Version=1.0.61025.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. The system cannot find the file specified. (c:\mydir\web.config line 54)
现在,我已经看了一下Google,看到有人说要运行一个简单的搜索和替换来改变“Microsoft.Web”.到“System.Web”因为命名空间已经改变了,但我根本没有运气.
这些是Web.config文件的相关行
<pages validateRequest="True"> <controls> <add tagPrefix="asp" namespace="Microsoft.Web.UI" assembly="Microsoft.Web.Extensions,PublicKeyToken=31bf3856ad364e35"/> <add tagPrefix="asp" namespace="Microsoft.Web.UI.Controls" assembly="Microsoft.Web.Extensions,PublicKeyToken=31bf3856ad364e35"/> </controls> <tagMapping> Line 54: <add tagType="System.Web.UI.WebControls.CompareValidator" mappedTagType="Microsoft.Web.UI.Compatibility.CompareValidator,Microsoft.Web.Extensions,PublicKeyToken=31bf3856ad364e35"/> <add tagType="System.Web.UI.WebControls.CustomValidator" mappedTagType="Microsoft.Web.UI.Compatibility.CustomValidator,PublicKeyToken=31bf3856ad364e35"/> <add tagType="System.Web.UI.WebControls.RangeValidator" mappedTagType="Microsoft.Web.UI.Compatibility.RangeValidator,PublicKeyToken=31bf3856ad364e35"/> <add tagType="System.Web.UI.WebControls.RegularExpressionValidator" mappedTagType="Microsoft.Web.UI.Compatibility.RegularExpressionValidator,PublicKeyToken=31bf3856ad364e35"/> <add tagType="System.Web.UI.WebControls.requiredFieldValidator" mappedTagType="Microsoft.Web.UI.Compatibility.requiredFieldValidator,PublicKeyToken=31bf3856ad364e35"/> <add tagType="System.Web.UI.WebControls.ValidationSummary" mappedTagType="Microsoft.Web.UI.Compatibility.ValidationSummary,PublicKeyToken=31bf3856ad364e35"/> </tagMapping> </pages>
我很欣赏任何对此的洞察力,因为我真的很挣扎.
提前致谢,
戴夫
解决方法
你应该在你的服务器上安装
ASP.NET AJAX for Asp.Net 2.0.
你可以在这里找到: http://www.microsoft.com/download/en/details.aspx?id=883
你可以在这里找到: http://www.microsoft.com/download/en/details.aspx?id=883
如果您无法访问此服务器,则可以将.dll文件上传到bin文件夹.
我希望它有效!