开发者

Could not load file or assembly "Microsoft.Web.Extensions"

I've inherited an asp.net 3.5 solution and I'm having trouble getting it working. I keep receiving the error:

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)

Now, I've had a good look around Google and have seen that people have said to run a simple search and replace to change "Microsoft.Web." to "System.Web." as the namespaces have changed, but I'm having no luck at all.

These are the pertinent lines of the Web.config file

<pages validateRequest="True">
    <controls>
        <add tagPrefix="asp" namespace="Microsoft.Web.UI" assembly="Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
            <add tagPrefix="asp" namespace="Microsoft.Web.UI.Controls" assembly="Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
    </controls>
    <tagMapping>开发者_如何学编程
        Line 54: <add tagType="System.Web.UI.WebControls.CompareValidator" mappedTagType="Microsoft.Web.UI.Compatibility.CompareValidator, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
        <add tagType="System.Web.UI.WebControls.CustomValidator" mappedTagType="Microsoft.Web.UI.Compatibility.CustomValidator, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
        <add tagType="System.Web.UI.WebControls.RangeValidator" mappedTagType="Microsoft.Web.UI.Compatibility.RangeValidator, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
        <add tagType="System.Web.UI.WebControls.RegularExpressionValidator" mappedTagType="Microsoft.Web.UI.Compatibility.RegularExpressionValidator, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
        <add tagType="System.Web.UI.WebControls.RequiredFieldValidator" mappedTagType="Microsoft.Web.UI.Compatibility.RequiredFieldValidator, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
        <add tagType="System.Web.UI.WebControls.ValidationSummary" mappedTagType="Microsoft.Web.UI.Compatibility.ValidationSummary, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
    </tagMapping>
</pages>

I would appreciate any insight into this, as I'm really struggling.


You should install on your server the ASP.NET AJAX for Asp.Net 2.0. You can find it here: http://www.microsoft.com/download/en/details.aspx?id=883

If you don't have access in this server, you can upload the .dll file into the bin folder.

I hope it works!


As it turns out, I had been given an incorrect web.config by the previous developers. Putting the new one in allowed me to compile and build the solution.

Once deployed to the server, I had installed the AJAX for ASP.NET 2.0, but still received errors referencing microsoft.web.extensions etc.

The solution lie in the versioning.

The whole application seems to be built on top of the AJAX for ASP.NET Beta 2 binary. After removing the 2.0 and re-installing the beta 2 MSI, everything fired into action.

Thanks for the pointers everyone.


you have to download ASPNET.2.0.AJAX.Extensions. and instal it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜