I keep getting this error when I try to run the web application I have inherited. It was written in 2010 for C # 3.5 and uses Mvc 2. I installed the necessary libraries, but I get this error.
Error 1 Failed to load type 'AdminConsole.MvcApplication. C: \ path \ to \ my \ app \ Global.asax 1
Global.asax.cs looks like this:
using System.Web.Mvc;
using System.Web.Routing;
namespace AdminConsole
{
public class MvcApplication : System.Web.HttpApplication
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
"Default",
"{controller}.aspx/{action}/{id}",
new { controller = "Entitlement", action = "Index", id = UrlParameter.Optional }
);
}
protected void Application_Start()
{
AreaRegistration.RegisterAllAreas();
RegisterRoutes(RouteTable.Routes);
}
}
}
And Global.asax looks like this: <%@ Application Inherits="AdminConsole.MvcApplication" Language="C#" %>
source
share