URL 路由 - HTTP 错误 404.0 - 未找到,IIS 8.0 中的 0x80070002
URL Routing - HTTP Error 404.0 - Not Found, 0x80070002 in IIS 8.0
我在 ASP.NET
应用程序中创建了路由规则。它在我的笔记本电脑 IIS 7.0
服务器上运行良好。但是当它在服务器上时,它显示 HTTP 错误 404.0 - 未找到。服务器只有 IIS 8.0
。
我的路由规则如下:
Global.asax :
void Application_Start(object sender, EventArgs e)
{
RegisterRoutes();
}
private static void RegisterRoutes()
{
System.Web.Routing.RouteTable.Routes.Add(
"Login", new System.Web.Routing.Route("Login.html",
new DisplayRouteHandler("~/Login.aspx")));
}
如果我不在路由规则中使用 .html,那么它在服务器上工作正常,但使用 .html,它就无法工作。
详细错误信息:
Module IIS Web Core
Notification MapRequestHandler
Handler StaticFile
Error Code 0x80070002
Requested URL http://www.theprojectjugaad.com:80/Login.html
Physical Path D:\Inetpub\vhosts\jeetenparmar.com\theprojectjugaad.com\Login.html
Logon Method Anonymous
Logon User Anonymous
请帮我解决这个问题。
将应用程序池从经典更改为集成解决了该问题。
我在 ASP.NET
应用程序中创建了路由规则。它在我的笔记本电脑 IIS 7.0
服务器上运行良好。但是当它在服务器上时,它显示 HTTP 错误 404.0 - 未找到。服务器只有 IIS 8.0
。
我的路由规则如下:
Global.asax :
void Application_Start(object sender, EventArgs e)
{
RegisterRoutes();
}
private static void RegisterRoutes()
{
System.Web.Routing.RouteTable.Routes.Add(
"Login", new System.Web.Routing.Route("Login.html",
new DisplayRouteHandler("~/Login.aspx")));
}
如果我不在路由规则中使用 .html,那么它在服务器上工作正常,但使用 .html,它就无法工作。
详细错误信息:
Module IIS Web Core
Notification MapRequestHandler
Handler StaticFile
Error Code 0x80070002
Requested URL http://www.theprojectjugaad.com:80/Login.html
Physical Path D:\Inetpub\vhosts\jeetenparmar.com\theprojectjugaad.com\Login.html
Logon Method Anonymous
Logon User Anonymous
请帮我解决这个问题。
将应用程序池从经典更改为集成解决了该问题。