Click here to Skip to main content
16,016,925 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

Iam having issue when my request url length .Iam getting browser exception as Bad Request - Invalid URL HTTP Error 400. The request URL is invalid.If i change my url size then response is coming correctly.I tried changing IIS setting by changing url max length still the issue remain.I also tried with updating the registry given in this link(stackoverflow.com/questions/15004232/wcf-get-url-length-limit-issue-bad-request-invalid-url) this also not worked.

Any one have the solution for this please reply to this post.




Regards
Vijay
Posted

1 solution

UPDATE: SOLUTION

I Found a solution which worked for me, when I research further on this. I'm updating here since it might be useful for others who come across this question.

This is an IIS Setting

The problem is because, the default character limit of each parameter in REST url is 260 which is defined in the registry.

So, you have to update the registry to increase this size limit where the IIS Server / IIS Express is running.

Following is the location of Registry:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\HTTP\Parameters

And the value name is UrlSegmentMaxLength. If it is not there, create one with Type of REG_DWORD. And specify a higher value for value data such as 1000 in hexadecimal or 4096 in decimal.

This is a http.sys setting. More about http.sys settings : http://support.microsoft.com/kb/820129

Make sure, you restart the server/machine to apply the registry changes. And that's it.
 
Share this answer
 
Comments
vijaykittur 28-Nov-14 5:43am    
thanks it worked for me after doing the things u mentioned..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900