Over the last couple of weeks I've been upgrading my Rasta framework to support IIS7. Here's the highlights:
- I automatically detect the base Url address for a site based on the application path and the first requested Url, at which point I create all the routing tables. This used to be at the end of the configuration code that used to run in Application_Start.
You cannot access HttpContext.Request from there anymore, so this has to change. Right now I delay the discovery at a later stage (on first request), but this solution only support a single domain per web app.
- DefaultHttpHandler is not supported anymore, so I have to implement the equivalent functionality for when Rasta doesn't recognize a Url and try to delegate to a registered handler. This probably won't land for a couple of weeks.
- More Url processing weirdness than IIS6, with no support for unencoded + in paths. This goes against the RFC for uris that specify quite clearly that segments in a path should be opaque until handled. IIS considers it has the right to handle them and crashes. This is seriously limiting our ability to provide a virtualized Url space on a web site (any character not supported by the file system will automatically crash the request before a handler is called, as asp.net tries and do a MapPath, even when you percent-encode the special chars. I consider this to be quite unacceptable and limits my choice of Uri.
I also ended up with some weird issues where upon building, the ccnet machine would see its access to web.config denied, and the only solution is to go and copy the files manually the first time around. I'm still trying to investigate what happened there.