Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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#" %> 
like image 692
Arslan Sunny Avatar asked Jul 21 '12 22:07

Arslan Sunny


People also ask

What is parser error in asp net?

A ParserError object represents an error that is created when an HttpParseException exception is thrown. A parser error object can contain error message text, a virtual path to the file where the error occurred, and the subsequent line number of the error in that file.

What is a parse error C++?

A parse-time error occurs when the syntax of the program is incorrect. (This is also called a compile-time error for languages such as C/C++ and Java.) A parse-time error is the easiest error to correct because the parser (or compiler) tells you exactly what is wrong and on what line the problem occurs.

What is Server error in '/' Application in asp net?

"Server error in '/' application" issue is an application error on the server that prevents the website from running. And this error is usually related to IIS and ASP.NET. IIS (Internet Information Services): It is an extensible web server service created by Microsoft for use with the Windows NT family.


1 Answers

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.

like image 99
Kevin Aenmey Avatar answered Sep 30 '22 01:09

Kevin Aenmey