Could not load file or assembly 'System.Web.Extensions, Version= RRS feed

  • Question

  • User19296721 posted

    I have a web application that is throwing this error only for a single page, I'm able to login and do everything else, but when attempting to access a particular page the following exception is thrown:

    Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. 

    Parser Error Message: Could not load file or assembly 'System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

    I'm not sure why it's trying to load version 4 as this website is built against .Net 2.0, I'm also not sure why every other page would work just fine but this one would throw the exception since nothing has changed. I've searched and tried replacing the assmebly in the bin folder with version 4, but the rest of the site fails to load when I do this. 

    I also searched for the file and copied it to C:\Windows\Microsoft.NET\Framework\v2.0.50727, to no avail.


    @Edit: Also worth noting is that this work just fine when I debug in VS, no problems with any page.

    Friday, January 18, 2013 10:01 AM


  • User19296721 posted

    So no idea why this worked. But I just rebuilt the site to a different location and recreated the website and everything fell into place.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, January 18, 2013 10:26 AM