Asp.net mvc 4 由于解析器错误,新的ASP.NET MVC 4基本项目未运行
使用Visual Studio 2013 Update 2,我创建了一个新的ASP.NET MVC 4 Web应用程序,并选择了空模板。然后我编译并运行代码,它给出了以下解析器错误Asp.net mvc 4 由于解析器错误,新的ASP.NET MVC 4基本项目未运行,asp.net-mvc-4,visual-studio-2013,Asp.net Mvc 4,Visual Studio 2013,使用Visual Studio 2013 Update 2,我创建了一个新的ASP.NET MVC 4 Web应用程序,并选择了空模板。然后我编译并运行代码,它给出了以下解析器错误 Server Error in '/' Application. Parser Error Description: An error occurred during the parsing of a resource required to service this request. Plea
Server Error in '/' Application.
Parser Error
Description: An error occurred during the parsing of a resource required to
service this request. Please review the following specific parse error details
and modify your source file appropriately.
Parser Error Message: Could not load type 'Remote.WebPortal.MvcApplication'.
Source Error:
Line 1: <%@ Application Codebehind="Global.asax.cs"
Inherits="Remote.WebPortal.MvcApplication" Language="C#" %>
Source File: /global.asax Line: 1
有什么想法吗?我觉得Global.asax文件没有任何问题。 请检查RouteConfig默认路由是什么,以及该操作是否存在任何问题 让我知道您是否有任何控制器或默认路由的任何操作
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Http;
using System.Web.Mvc;
using System.Web.Routing;
namespace Remote.WebPortal
{
public class MvcApplication : System.Web.HttpApplication
{
protected void Application_Start()
{
AreaRegistration.RegisterAllAreas();
WebApiConfig.Register(GlobalConfiguration.Configuration);
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
RouteConfig.RegisterRoutes(RouteTable.Routes);
}
}
}