Reputation: 101
It seems to work properly (MaxUrlLength in web.config) because if I set it to 0 it raises asp.net exception about maxUrlLength but if I set it to 1024 I face another problem IIS tells that it is bad request 400.
Maybe somebody know about this setting(or constraint) in IIS ?
Upvotes: 0
Views: 798
Reputation: 6218
Before ASP.NET 4.0, maxUrlLength is constrained to 260 characters, based on NTFS file-path limit. In ASP.NET 4, you have the option to increase (or decrease) this limit as appropriate for your applications, using two new httpRuntime configuration attributes. You can also get 400 status error if ASP.NET finds an invalid character in the path portion of a URL.
ref: [http://www.asp.net/whitepapers/aspnet4#0.2__Toc253429244]
Although the specification of the HTTP protocol does not specify any maximum length, practical limits are imposed by web browser and server software.
REF:
http://www.boutell.com/newfaq/misc/urllength.html
http://www.iis.net/ConfigReference/system.webServer/security/requestFiltering/requestLimits
Upvotes: 1