I get a 400 bad request - invalid Url when the length of the request exceeds 320+ characters

后端 未结 2 1967
栀梦
栀梦 2021-02-05 19:13

Not sure what could be the reason. Added the following in Web.config also. maxUrlLength=\"1024\" maxQueryStringLength=\"1024\" requestPathInvalidCharacters=\"\" maxRequestLength

2条回答
  •  天涯浪人
    2021-02-05 20:06

    run in powershell

    Set-ItemProperty -Path HKLM:\System\CurrentControlSet\Services\HTTP\Parameters -Name UrlSegmentMaxLength -Value 2000 -Type "Dword"

    then do net stop http and net start http.

    https://blogs.msdn.microsoft.com/amyd/2014/02/06/response-400-bad-request-on-long-url/

提交回复
热议问题