I am using HttpContext.RewritePath
in Global.asax for some URL rewriting, and it works very well in my development environment on the Cassini server. But when I copy it to the production server running IIS 7, it isn't working. I have also tried to use Context.Server.TransferRequest
but then I get the error: "This operati开发者_如何学Pythonon requires IIS integrated pipeline mode." on both Cassini and IIS 7 (on IIS 7 the website is running in "Integrated" mode in the AppPool).
I rewrite all URLs on the website like /[The main menuname]/[pagename].aspx
e.g. from /web/thesite.aspx?mainmenu=manager
to /manager/thesite.aspx
OR /web/theOtherSite.aspx?mainmenu=about
to /about/theOtherSite.aspx
, and so on...
I found out that i need to add the following to web.config
<configuration>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
</system.webServer></configuration>
精彩评论