Could not load file or assembly ‘System.Web.Helpers, Version=1.0.0.0

[wp_ad_camp_1]
I recently ran in to this error on an IIS 6 server using MVC 3 Razor.

Check this first

your exception:

System.IO.FileNotFoundException: Could not load file or assembly ‘System.Web.Mvc, Version=1.0.0.0

It is trying to load MVC version 1. You probably need to do an assembly binding redirect in your test project as well, same as the one in the web.config:


   
      
         
         
      
   

Place that in the 

configuration

 section of the app.config of your test assembly.

 

Check this second

Manually copy these files to your website’s bin directory (they should be on your development machine) or you can include them in your website’s build: Instructions here

System.Web.WebPages.Razor.dll
System.Web.WebPages.Deployment.dll
System.Web.Razor.dll
System.Web.Mvc.dll
System.Web.Helpers.dll
Microsoft.Web.Infrastructure.dll

 

Make sure you are running the right version of .net on your website in IIS:

http://brakertech.com/iis-6-0-site-running-wrong-version-of-net/

[wp_ad_camp_2]

Additionally ensure ASP.NET MVC 3 is set up properly in IIS 6:

http://brakertech.com/set-up-asp-mvc3-iis6/

3 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.