相关疑难解决方法(0)

IIS 6上的ASP.NET MVC - 通配符映射 - 传入请求与任何路由都不匹配

我一直在尝试在IIS 6上设置我的Beta 1 MVC应用程序,但无法正常运行.我已按照其他博客文章中的建议添加了.net isapi DLL的通配符映射,但在访问网站的根目录时出现以下错误:

The incoming request does not match any route.
..
[HttpException (0x80004005): The incoming request does not match any route.]
   System.Web.Routing.UrlRoutingHandler.ProcessRequest(HttpContextBase httpContext) +147
   System.Web.Routing.UrlRoutingHandler.ProcessRequest(HttpContext httpContext) +36
   System.Web.Routing.UrlRoutingHandler.System.Web.IHttpHandler.ProcessRequest(HttpContext context) +4
   HCD.Intranet.Web.Default.Page_Load(Object sender, EventArgs e) +81
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +33
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +47
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1436
Run Code Online (Sandbox Code Playgroud)

我正在使用MVC模板应用程序中提供的Default.aspx页面,该页面正确地重写对网站根目录的访问.

public partial class Default : Page
{
    public void Page_Load(object sender, System.EventArgs e)
    {
        HttpContext.Current.RewritePath(Request.ApplicationPath);
        IHttpHandler …
Run Code Online (Sandbox Code Playgroud)

asp.net-mvc iis-6 .net-3.5

8
推荐指数
2
解决办法
2万
查看次数

标签 统计

.net-3.5 ×1

asp.net-mvc ×1

iis-6 ×1