0
我在Global.asax中使用HttpContext.RewritePath
来进行一些URL重写,并且它在我的开发环境中在Cassini服务器上工作得非常好。但是,当我将它复制到运行IIS 7的生产服务器时,它不起作用。我也尝试使用Context.Server.TransferRequest
,但后来我得到错误:“此操作需要IIS集成管道模式。”在卡西尼和 IIS 7上(在IIS 7上,网站在AppPool中以“集成”模式运行)。IIS 7上的httpContext.RewritePath问题
我重写了网站上的所有网址,例如/[The main menuname]/[pagename].aspx
从/web/thesite.aspx?mainmenu=manager
到/manager/thesite.aspx
OR /web/theOtherSite.aspx?mainmenu=about
到/about/theOtherSite.aspx
,等等...
如果您对为什么不使用IIS发展Vista或Window 7.或者,您可以使用IIS 7 express http://weblogs.asp.net/scottgu/archive/2010/06/28/introducing-iis-express.aspx,希望您能够进行调试你的问题。另外,您是否可以更好地重新格式化网址,以便我们了解“之前”和“之后”网址? – 2011-02-12 07:31:06