Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
667 views
in Technique[技术] by (71.8m points)

asp.net mvc 3 - Parser Error: Server Error in '/' Application

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 and modify your source file appropriately."

Parser Error Message: `Could not load type 'nadeem.MvcApplication'`.
Source Error:  Line 1:  <%@ Application Codebehind="Global.asax.cs" Inherits="nadeem.MvcApplication" Language="C#" %>
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Right-click your Global.asax file and click View Markup. You will see the attribute Inherits="nadeem.MvcApplication". This means that your Global.asax file is trying to inherit from the type nadeem.MvcApplication.

Now double click your Global.asax file and see what the class name specified in your Global.asax.cs file is. It should look something like this:

namespace nadeem
{
    public class MvcApplication: System.Web.HttpApplication
    {
    ....

If it doesn't, then you will receive the error you received. The value in the Inherits attribute of your Global.asax file must match a type that is derived from System.Web.HttpApplication.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...