Tuesday, May 18, 2010

IIS max request url limit?

The .Net Framework has a restriction of MAX_PATH (260) characters on physical path and so asp.net has a similar restriction on urls.
 
For ASP.NET 4.0. :
 
Add settings to config file
<httpRuntime maxRequestPathLength="260" maxQueryStringLength="2048" />
 
 
 
For Earlier ASP>NET version
 
In the registery 'HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\HTTP\Parameters', add following entry
"UrlSegmentMaxLength"=dword:00000200 (512 characters) and I restarted system for the registry entry to take effect.
 

No comments: