Click here to Skip to main content
15,886,011 members
Articles / Web Development / ASP.NET
Tip/Trick

Set your maxUrlLength in ASP.NET MVC

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
18 Feb 2012CPOL 23.1K   2  
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.;
HTML
<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[^]

License

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


Written By
Software Developer BBD Johannesburg
South Africa South Africa
Bsc (Hons) Business Information Systems.
MCTS: Web Applications Development with Microsoft .NET Framework 4
MCTS: Windows Communication Foundation Development with Microsoft .NET Framework 4
MCTS: Accessing Data with Microsoft .NET Framework 4
Microsoft Certified Professional Developer Certification.

Comments and Discussions

 
-- There are no messages in this forum --