Last post Mar 27, 2015 01:32 AM by Shawn - MSFT
Mar 26, 2015 08:00 AM|RRam|LINK
In asp.net mvc4 , i am using restfull service post method to pass certain data to service. I get a 400 bad request if the parameter excceds certain limit. I have event tries giving
But not helped. Please advice
Mar 26, 2015 10:52 AM|Siva Krishna Macha|LINK
When you use POST, usually the content goes into the body and if so you shouldn't get that issue. So suggest to check if you are really using GET or POST.
It is possible even if you are using POST, if the url length exceeds the limit, you can get this issue. So, cross check if you are using a large url where it shouldn't be generally. Let us know if you have a specific requirement where you had to use the
In any case, to increase the parameter, you can do it in web.config file
<compilation debug="true" targetFramework="4.0" />
Mar 27, 2015 01:32 AM|Shawn - MSFT|LINK
IIS’ maximum length for a URL is defined by the maxUrlLength of the httpRuntime property. The default value is
260 characters. This may cause problems for URL’s that are longer than the configured maxUrlLength.
For this scenario, you could try to set the maximum URL length for the maxUrlLenght: