IIS 6 on x64 and long URLs

iisiis-6

I have a very long URL on a site hosted on Windows 2003 x64 that looks like this:

http://myhost/a_very_very_long_url_around_300_chars_long

(i.e. a single, very long segment around 300 chars long)

Problem is, I'm getting a 400 Bad Request response from HTTP.SYS (it doesn't even reach IIS). I can tell because these requests show up in system32\LogFiles\HTTPERR, e.g:

2009-09-17 19:51:29 200.123.179.9 3636 192.168.129.50 80 HTTP/1.1 GET /a_very_very_long_url_around_300_chars_long 400 - URL -

I tried setting UrlSegmentMaxLength in the registry and this fixes the issue on my Windows 2003 x86 box but not on the x64 production server. I tried this on another Win2k3 x64 server and it also failed.

Any hints?

Best Answer

Since you are seeing errors in the HTTPERR log, this is not a URLScan issue - HTTP.sys has not handed the URL off to IIS, so the URLScan ISAPI filter won't run.

From a different Windows IT Pro article, HTTP.sys has taken over for URLScan for most issues regarding URL and segment lenghts, and you are correct in examining the HTTP.sys registry keys.

Interestingly enough, I'm able to change this, but have problems making physical directories or virtual directories that are this long due to MAX_PATH issues and Metabase restrictions.

If you are using a rewriting tool, you actually might be having issues that are apparent in only the x64 implimentation, or a slight difference between how x86 and x64 interprets the URL.