IIs错误:Application Codebehind ="Global.asax.cs" Inherits ="nadeem.MvcApplication" [英] IIs Error: Application Codebehind=“Global.asax.cs” Inherits=“nadeem.MvcApplication”
本文介绍了IIs错误:Application Codebehind ="Global.asax.cs" Inherits ="nadeem.MvcApplication"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试部署我的Web项目,但不断出现此错误:
I am trying to deploy my web project and I keep getting this error:
Line 1: <%@ Application Codebehind="Global.asax.cs" Inherits="nadeem.MvcApplication" Language="C#" %>
我看了这篇文章:解析器错误: "/"应用程序中的服务器错误
但这在我的项目中是正确的.
But it is currect in my project.
我怀疑我的iis7配置有问题.
I suspect it something with my iis7 configuration.
有什么想法吗?
Global.asax:
Global.asax:
<%@ Application Codebehind="Global.asax.cs" Inherits="tamal.pelecard.biz.MvcApplication" Language="C#" %>
Global.asax.cs:
Global.asax.cs:
namespace TamalTest
{
using System;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
public class MvcApplication : HttpApplication
{
protected void Application_Start()
{
AreaRegistration.RegisterAllAreas();
RegisterGlobalFilters(GlobalFilters.Filters);
RegisterRoutes(RouteTable.Routes);
}
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
{
filters.Add(new HandleErrorAttribute());
}
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
}
}
}
推荐答案
已解决,只需将 Global.asax 重命名或删除它即可解决问题:/
Solved, just renamed the Global.asax or delete it fixed the problem :/
我在网络上发现的其他已知相关错误:
Other known related bugs I found on the web:
- Global.asax.cs :必须从
HttpApplication -> public class MvcApplication : HttpApplication
继承
- 项目输出必须是bin文件夹,而不是 Bin/Debug 等.
- 应用程序池不是正确的.net版本.
- Global.asax.cs: must inherit from
HttpApplication -> public class MvcApplication : HttpApplication
- Project output must be the bin folder and not Bin/Debug, etc.
- Iss application pool is not in the correct .net version.
这篇关于IIs错误:Application Codebehind ="Global.asax.cs" Inherits ="nadeem.MvcApplication"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文