Could not load type 'System.Web.Mvc.ViewUserControl<SOMETYPE>'.
- by Evgenyt
I'm trying to deploy ASP.NET MVC 2 project (VS2010) to Win Server 2008 R2
It works perfectly on dev machine. But strange error occurs at Server 2008 R2:
When .ascx file has header that uses generic type:
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<MyProj.Web.Models.RangeViewModel>" %>
Server reports Could not load type 'System.Web.Mvc.ViewUserControl<MyProj.Web.Models.RangeViewModel>'.
But when I declare somewhere in .cs file type like
public class AA : System.Web.Mvc.ViewUserControl<MyProj.Web.Models.RangeViewModel>
{
}
and use it instead in <%@ Control header. Then it works as it should.
Am I missing something?