Getting ASP.NET MVC 3 working on DiscountASP.net

Tags: ASP.NET, DiscountASP.net, MVC

Though this article should apply to any IIS7 shared-hosting platform, I can only confirm it works on DiscountASP.net.

Getting Errors After Deploying your Application?

After deploying your application, you might see the following error message...

Could not load file or assembly 'System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

This is due to the MVC binaries not being installed in the GAC on the server. But do not fret, the GAC is only optional for MVC 3!

Adding References to the Assemblies

MVC 3 References

Add references to all of the following ASP.NET MVC 3 Assemblies.

  • Microsoft.Web.Infrastructure
  • System.Web.Abstractions
  • System.Web.Helpers
  • System.Web.Mvc
  • System.Web.Razor
  • System.Web.WebPages
  • System.Web.WebPages.Deployment
  • System.Web.WebPages.Razor

MVC 3 Copy Local


Finally set them all to Copy Local = True. Now when you deploy all the required MVC libraries will be included.


EDIT: You can also use Deployable Dependencies.

Add a Comment