2010-12-03 101 views
0

我在Window Server 2003 R2 x64上部署MVC2应用程序时出现问题。有没有人有同样的问题?我已经尝试了不同的方法,从global.asx,通配符映射和无济于事。我在想这是Windows Server 2003 R2 x64特定问题。在Window Server 2003 R2 x64上部署MVC2应用程序iis6

http://haacked.com/archive/2008/11/26/asp.net-mvc-on-iis-6-walkthrough.aspx

Deploying Asp.Net MVC 2 /C# 4.0 application on IIS 6

+0

您在应用程序中遇到了什么问题?没有编译?没有正确的路由?其他? – Jaime 2010-12-03 18:52:31

+0

编译没问题,在服务器上部署了发布bin并获得了HTTP 401.1 - 未经授权:登录失败错误 – odez213 2010-12-03 18:56:47

回答

1

你有一个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); 
    } 
} 
相关问题