ASP.NET 3.5, IIS7
In my Global.asax's Application_BeginRequest, I need to extract from the request's URL an entirely seperate URL that's been embedded in it without using query string.
The solution I came up with was to hex-encode the entire target URL as if it were a directory, as follows:
http://localhost/687474703A...etc...732E6D7033/irrelevantFilename.txt
This fails for IIS7, whose ASP.NET implementation won't tolerate a URL path greater than 260 characters.
My code controls how the request URL gets generated, and how it might embed the target URL in there, but it doesn't have any control over that target URL value (they're third-party URLs).
How better could I embed this target URL in my request URL?