65.9K
CodeProject is changing. Read more.
Home

Set your maxUrlLength in ASP.NET MVC

emptyStarIconemptyStarIconemptyStarIconemptyStarIconemptyStarIcon

0/5 (0 vote)

Feb 17, 2012

CPOL
viewsIcon

23510

If you want to increase or decrease your maxUrlLength in ASP.NET to limit the max URL for your site, you can do the following: In your main Web.Config file under the system.web tag, add a node called httpRuntime and add a property called maxUrlLength, e.g.;
<httpRuntime maxUrlLength="22" />
Note: 22 is just an example number. For more options, visit the link below: http://msdn.microsoft.com/en-us/library/system.web.configuration.httpruntimesection.maxurllength.aspx[^]