WCF GET URL Length Limit Issue: Bad Request - Invalid URL

前端 未结 5 2182
心在旅途
心在旅途 2020-12-10 11:14

I tried to access a WCF Service through jQuery AJAX call with GET method. So, sometimes the URL is lengthy with parameters.

When the parameters becomes so lengthy, jQ

5条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-10 12:02

    Adding another answer just for completeness. In my case I had all the right values in web.config:

        
        ...
            
            
            
        
    ...
      
        
          
            
            
          
        
      
    ...
    

    However, I was still getting the 400 error on one of the IIS servers. After more investigation and configuration comparison it turned out that the UrlScan IIS module was the culprit. By uninstalling the module or editing the UrlScan.ini file to modify max length values the issue has been resolved:

    ...
    [RequestLimits]
    MaxAllowedContentLength=104857600
    MaxUrl=3000
    MaxQueryString=3000
    

提交回复
热议问题