解析器错误:“/"应用程序中的服务器错误 [英] 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#" %>
推荐答案
右键单击您的 Global.asax
文件,然后单击 View Markup
.您将看到属性 Inherits="nadeem.MvcApplication"
.这意味着您的 Global.asax
文件正试图从 nadeem.MvcApplication
类型继承.
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
.
现在双击您的 Global.asax
文件并查看您的 Global.asax.cs
文件中指定的类名是什么.它应该看起来像这样:
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
{
....
如果没有,那么您将收到您收到的错误.Global.asax
文件的 Inherits
属性中的值必须匹配从 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
.
这篇关于解析器错误:“/"应用程序中的服务器错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!