The request URL is invalid in IIS 7

前端 未结 3 1408
轮回少年
轮回少年 2021-02-07 11:56

here is my URL

http://abc.domain.com/controller/action/A74444C3A7FA858C7995CA9954CBCF1E26604634767C5575396D908E8415CF8CCC04C05F49FED0AA9D9743B69ABF232BDE9787A5222D081DA6

3条回答
  •  时光说笑
    2021-02-07 12:36

    This one is for posterity and for tracking my own problem. It's been said in another answer however, not as explicitly.

    I've had the same problem on my end. The answer is of course to transfer the long URL segment to a Query string. Easier to handle.

    The problem however is that HTTP.sys is not even letting the request through because a segment of the URL is exceeding 260 or so characters. However, we still had to support it.

    You can change that setting in the registry. Once you reboot, the url will work.

    Registry:

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\HTTP\Parameters]
    "UrlSegmentMaxLength"=dword:00000400
    

    This will effectively set the segment length to 1024.

    Source

提交回复
热议问题