Last post Jun 19, 2010 01:36 PM by carneyalansford
Jun 19, 2010 01:36 PM|carneyalansford|LINK
Environment: IIS7 (integrated mode), ASP.NET 3.5 SP1
Our requirement is to rewrite /some-custom-url to /Default.aspx?PageID=123.
Because we're using Forms Authentication, we're doing Context.RewritePath() in AuthorizeRequest. Everything works fine, except when we looked in the IIS log file, we saw /Default.aspx PageID=123 instead of /some-custom-url.
To fix this, we did Context.RewritePath(originalURL) in PreRequestHandlerExecute. Everything else still works, but now the log shows /some-custom-url PageID=123. If we request /some-custom-url?test=1, then we see /some-custom-url test=1 in the log file,
which is correct.
So, it seems that when we request a custom url with no query parameters, a minor logging issue still exists. I thought about just rewriting to /some-custom-url? in PreRequestHandlerExecute, but that seems like a hack. What am I missing?