Solving development problems  |  About this blog

Archive for the ‘.net framework 3.5 sp1’ tag

Hosting ASP.NET MVC on IIS7 and “Could Not Load Type” error

  1. If you want to host ASP.NET MVC on IIS7 don’t forget to copy also MVC DLLs to bin directory when publishing.
    • If you have ASP.NET 3.5 SP1 installed on server copy only System.Web.Mvc
    • If you don’t have ASP.NET 3.5 SP1 installed on server copy
      System.Web.Mvc
      System.Web.Routing
      System.Web.Abstractions
  2. You need to copy also web.config that is under directory where your Views are – it is not included in your project by default so it will not be published. Copy this manually or include this web.config in your project and then Publish.

Written by Avivo

September 14th, 2009 at 4:15 pm