Not sure what could be the reason. Added the following in Web.config also. maxUrlLength=\"1024\" maxQueryStringLength=\"1024\" requestPathInvalidCharacters=\"\" maxRequestLength
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.
net stop http
net start http
https://blogs.msdn.microsoft.com/amyd/2014/02/06/response-400-bad-request-on-long-url/