Widgets Could not load file or assembly 'System.Web.Abstractions, Version=, Culture=neutral, PublicKeyToken= 31bf3856ad364e35' or one of its dependencies.


I dream in code

About the author

Robert Williams is an internet application developer for the Salem Web Network.
E-mail me Send mail
Go Daddy Deal of the Week: 30% off your order at! Offer expires 11/6/12

Recent comments




Code Project Associate Logo


The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

Could not load file or assembly 'System.Web.Abstractions, Version=, Culture=neutral, PublicKeyToken= 31bf3856ad364e35' or one of its dependencies.

If you had tried to visit this site in mid-November, this is the ugly error message you would have received: "Could not load file or assembly 'System.Web.Abstractions, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies". My last update had been 2 full weeks before the site went down. My hosting provider (GoDaddy) assures me that nothing has changed at their end, I knew nothing had changed at my end and the last modified dates of my files on their server reflected this. A republish of the site did not help. Deleting all the files from the server, testing it locally (which worked even though I did not have the missing assembly on my PC) and republishing did not resolve the issue. So while I still have no idea why my project suddenly requires the System.Web.Abstractions.dll assembly I did at least figure out how to bring it back online. First I downloaded the Microsoft ASP.NET MVC Beta installer and ran it on my local machine. Then I searched my hard drive for the System.Web.Abstractions.dll file again and found it here: "C:\Program Files\Microsoft ASP.NET\ASP.NET MVC Preview 3\Assemblies". I FTP'd the file into my bin folder on the server and tested my site. Almost the same error, but instead of not finding the assembly at all, it now found the wrong version. It was looking for version and the latest MVC Beta (BETA 3) has version A quick Google search lead me to this solution which suggested adding a bindingRedirect to my web.config. I added it right before the closing </configuration> tag at the very bottom of my web.config:

  <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
    <assemblyIdentity name="System.Web.Abstractions" publicKeyToken="31BF3856AD364E35"/>
    <bindingRedirect oldVersion="" newVersion=""/>

And voila, the site is back up. Did anyone else experience this issue recently? 2 weeks prior to this I had updated from BlogEngine.Net 1.3 to 1.4.5; and for the first time compiled the site with Visual Studio 2008 instead of Visual Studio 2005. I had also upgraded the Ajax Control Toolkit to version 3.5. However, as I mentioned before, all of this happened a full two weeks before the site went down with this error. I suspect that (since not even a single line of text was changed on this site in all that time) GoDaddy must have applied a service pack, or an update to their server to cause the dependency on the missing assembly. If anyone has more information, please let me know.


Posted by Williarob on Wednesday, November 19, 2008 7:00 PM
Permalink | Comments (2) | Post RSSRSS comment feed
blog comments powered by Disqus