Parser Error: Server Error in '/' Application

前端 未结 19 2978
失恋的感觉
失恋的感觉 2020-12-05 22:33

I got the following error: \"An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details a

相关标签:
19条回答
  • 2020-12-05 23:36

    Since normally you create an MVC project the Global.asax markup has something like the following:

    <%@ Application Codebehind="Global.asax.cs" Inherits="StackOverflow.MvcApplication" Language="C#" %>
    

    Have you placed the Global.asax.cs in another project? If you have remove the CodeBehind="..." declaration from Global.asax and change the Inherits="..." declaration to reference the correct namespace and classname as it is defined in Global.asax.cs file.

    If you haven't moved it try a Clean and then Rebuild of the Project in Visual Studio using the context Menu on the Web project. That worked for me when I got this error.

    0 讨论(0)
提交回复
热议问题