I am getting this error:
The length of the URL for this request exceeds the configured maxUrlLength value.
Looking around the
Take a look at this post by Hanselman. Although this post is about accepting typically invalid characters in the URL he also mentions how to configure the length of the path and the query string
While we're in here, note that in ASP.NET 4 you can also change allowed path and queryString lengths:
<httpRuntime maxRequestPathLength="260" maxQueryStringLength="2048" />
Having the same problem in IIS8, the solution was to modify the root Web.config for the .NET Framework. This file is located in %windir%\Microsoft.NET\Framework\framework_version\CONFIG. Editing the web.config file in the site root did not resolve the issue.
As per Ashok's answer that would equate to:
<httpRuntime maxUrlLength="1024" relaxedUrlToFileSystemMapping="true"/>
within <system.web>
section of the web.config.
I had this problem in a rest service I created using C# .net 4. I set the maxUrlLength variable, in the system.web section, of the Web.Config file.
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
<httpRuntime maxUrlLength="2000"/>
</system.web>
....
have you seen this msdn article that seems to what you need
In my case, I edited the setting visually in the IIS application (Request Filtering area):
This action modified my web.config as follows:
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="524288000" maxQueryString="4096" />
</requestFiltering>
</security>
As was mentioned in some of the other answers, be sure to also consider long query strings in the request.