iis - ASP.NET MVC, Url Routing: Maximum Path (URL) Length -
scenario
I have an application where we have received a good old query string URL structure:
? X = 1 & amp; Y = 2 & amp; Z = 3 & amp; A = 4 and b = 5 & amp; C = 6
and turned it into a path structure:
/ x / 1 / y / 2 / z / 3 / a / 4 / B / 5 / c / 6
We are using ASP.NET MVC and (naturally) ASP.NET routing.
The problem
The problem is that our parameters are dynamic, and there is no limit to the amount of (theoretically) the parameters that we need to adjust for this.
It is fine unless we are not affected by the following train:
HTTP Error 400.0 - Bad Request ASP.NET detected illegal characters in the URL .
IIS will throw this error when our URL becomes a prolonged exponent.
Nitai Kirkira
Here we found out:
This is not an IIS problem
The maximum path length in IIS is the limit , But the above error is not it.
Learn how to use dot IIS dot net request filtering section "Filter by request limit"
If path was too long for IIS, it would throw a 404.14, Notwithstanding this, the IIS maximum path (and query) length is configurable:
& lt; RequestLimits maxAllowedContentLength = "30000000" maxUrl = "260" maxQueryString = "25" / & gt;
This is an asp.net problem
After poking something around:
IIS Forum Thread: ASP.NET 2.0 Maximum URL Length ?
It turns out that it is a ASP.NET (well, .net actually) problem.
The heart of the matter is that, as far as I can tell, the ASP Net can not be a long way beyond 260 characters.
Stack overflow ASP.NET URL MAX_PATH border question id <
question
So what's the question?
The question is, how big is it?
For my app, it's a bargain killer for most apps, this is probably a non-issue.
What about disclosures? No, where ASP.Net routing is mentioned, I have ever heard a glimpse of this limit. The fact that ASP.NET MVC uses ASP.NET routing also makes a big impact of this.
What do you think?
I web. In order to resolve this problem, the Mvc2 and .Net Framework 4.0
& lt; HttpRuntime maxUrlLength = "1000" Easy URLToffs Systemmapping = "True" />
Comments
Post a Comment