The request URL is invalid in IIS 7

前端 未结 3 1422
轮回少年
轮回少年 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

    0 讨论(0)
  • 2021-02-07 12:46

    Your problem is you're not using a query string, but a path. A path has a maximum length of 255.

    0 讨论(0)
  • 2021-02-07 12:53

    The final path segment is likely to be too long.

    See: http://social.msdn.microsoft.com/Forums/nl/netfxnetcom/thread/723e6bfd-cab7-417b-b487-67f1dcfa524f

    0 讨论(0)
提交回复
热议问题