Tech blog

Solving problems

About
Contact

Archive for the ‘Could Not Load Type’ tag

Could Not Load Type in ASP.NET MVC

leave a comment

If you got this message you have missing web.config in Views directory.

You have this file in your development project – click on it in Visual Studio and set to Copy Local, so it will be copied when you click Publish.

VN:F [1.9.3_1094]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.3_1094]
Rating: 0 (from 0 votes)

Written by Avivo

November 30th, 2009 at 5:39 pm

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

one comment

  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.
VN:F [1.9.3_1094]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.3_1094]
Rating: 0 (from 0 votes)

Written by Avivo

September 14th, 2009 at 4:15 pm