Hi Karl,
I'm having similar difficulties finding information about url rewriting in IIS7. I'm keen to see what responses you get, and I don't want to hijack the thread, but I'd also settle for being able to get the old style of url rewriting working.
Currently we have an application that achieves URL rewriting in IIS5 and IIS6 by using a wildcard application mapping to .NET and we have an HttpModule which calls HttpContext.RewritePath when the HttpApplication.BeginRequest event is fired. To get postback's working we have our own class derived from Page which overrides the Render method and uses our own HtmlTextWriter which corrects the url in the form tag. It's actually quite easy once you figure it out and it seems to work really well now in both IIS5 and IIS6.
With IIS7 (Vista RC1 build 5600) I realised that we could do away with the wildcard application mapping since our HttpModule would now be able to catch all requests. I've got this working, but it seems that when IIS Core chooses the HttpHandler it doesn't use the rewritten url.
here is an example project for you to see what I'm talking about http://nate.deepcreek.org.au/download/SampleUrlRewriter.zip (6 KB)
You should be able to just unzip it and point a website with a .NET 2.0 integrated App Pool at it to get it up and running.
requesting http://localhost/database/file1.gif unexpectedly produces a 404 from the StaticFile handler even though the Requested URL is correctly rewritten.
HTTP Error 404.0 - Not Found
Description: The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.
Error Code: 0x80070002
Notification: MapRequestHandler
Module: IIS Web Core
Requested URL: http://test/Default.aspx?database=%2fdatabase%2fmygif.gif
Physical Path: D:\Dev\CS\ExampleRewritePath\database\mygif.gif
Logon User: Anonymous
Logon Method: Anonymous
Handler: StaticFile
If you request http://test/Default.aspx?database=%2fdatabase%2fmygif.gif then it works fine
Aside from the wrong handler being used after the RewritePath the other thing i noticed is that the Physical Path was not updated to match the new url.
To test this further, i caught the HttpApplication.MapRequestHandler event in my HttpModule and used the debugger to see the HttpRequest.PhysicalPath value. It had changed correctly to match the new url, so it would seem that the physical path in iis core is not getting updated to match the changed path in .NET. Could this be the reason that IIS Core is incorrectly choosing the StaticFile handler instead of the *.aspx handler, or is there something else I should be doing?
Cheers,
Nate