Asp.net mvc 2 在Windows Server 2003 R2 x64上部署MVC2应用程序iis6

Asp.net mvc 2 在Windows Server 2003 R2 x64上部署MVC2应用程序iis6,asp.net-mvc-2,iis-6,Asp.net Mvc 2,Iis 6,在Windows Server 2003 R2 x64上部署MVC2应用程序时遇到问题。有人有同样的问题吗?我尝试过global.asx、通配符映射等不同的方法,但都没有成功。我认为这是WindowsServer2003R2 x64的特定问题 您的主目录中是否有Default.aspx?如果没有,请尝试添加一个隐藏此代码的 public partial class _Default : Page { public void Page_Load(object sender, System

在Windows Server 2003 R2 x64上部署MVC2应用程序时遇到问题。有人有同样的问题吗?我尝试过global.asx、通配符映射等不同的方法,但都没有成功。我认为这是WindowsServer2003R2 x64的特定问题


您的主目录中是否有Default.aspx?如果没有,请尝试添加一个隐藏此代码的

public partial class _Default : Page
{
    public void Page_Load(object sender, System.EventArgs e)
    {
        // Change the current path so that the Routing handler can correctly interpret
        // the request, then restore the original path so that the OutputCache module
        // can correctly process the response (if caching is enabled).

        string originalPath = Request.Path;
        HttpContext.Current.RewritePath(Request.ApplicationPath, false);
        IHttpHandler httpHandler = new MvcHttpHandler();
        httpHandler.ProcessRequest(HttpContext.Current);
        HttpContext.Current.RewritePath(originalPath, false);
    }
}

你的应用程序有什么问题?没有编译?没有正确的路由?其他?编译正常,在服务器上部署了发布站,并获得HTTP 401.1-未经授权:登录失败错误尝试此针对Windows 2008 server和IIS7的分步教程。也许对你有帮助。我试着在Global.asax中的application.Start()中调试它,但它似乎一点也不起作用。我正在考虑与配置相关的权限…可能它没有进入ASP.NET管道。网站是否在IIS中配置了ASP.NET?此外,请尝试直接点击default.aspx或控制器/操作路由。检查是否需要注册不同版本的asp.net。没有想到一个CGKhmm现在加载配置文件时出错:对路径“c://mypath/web.config”的访问被拒绝。看起来像是权限问题……可能IIS没有读取该文件夹的权限(即,在默认web路径之外)