In IIS, why does calling GetServerVariable("HTTP_URL") of the HttpWorkerRequest class result in different values depending on the pipeline mode?
When running under Integrated mode, it returns the raw url (that the server sees e.g, “/SomeUrl/Default.ashx”).
While under Classic mode it seems like the value is the url that was typed into the browser (my url router maps for example /someurl to that specific handler).
Finally resolved this. Turns out we were doing a
HttpContext.RewritePathwhich (I think) changes the result ofGetServerVariable("HTTP_URL")under Integrated Mode. We replaced this by newing up the correspondingIHttpHandlerand invoking it, instead of rewriting the path.