maxUrlLength in MVC only mode.

Posted by Community Admin on 04-Aug-2018 18:01

maxUrlLength in MVC only mode.

All Replies

Posted by Community Admin on 14-Aug-2013 00:00

In pure MVC mode I have a simple widget that shows News (Index + Detail
views). If news title is too long (lets say between 300 and 400
symbols), Detail view page throws exception: "The specified path, file
name, or both are too long. The fully qualified file name must be less
than 260 characters, and the directory name must be less than 248
characters."

On the other hand, in web.config file maxUrlLength is set to "102400":

<httpRuntime
maxRequestLength="102400" maxUrlLength="102400"
maxQueryStringLength="10000"
requestValidationType="Telerik.Sitefinity.Security.Claims.CustomRequestValidator,
Telerik.Sitefinity" />

Why this setting isn't applied and what would you recommend to handle these situations? Thanks.

Posted by Community Admin on 20-Aug-2013 00:00

Hello Denis,
How do you navigate to the detail view? Are you passing the news title as a parameter to the Detail action? This limitation is in the Http.sys kernel driver in Windows Server that handles HTTP requests.
In order to fix it, you need to increase the UrlSegmentMaxLength setting in the registry of your server.
Check this article - support.microsoft.com/.../820129
I think that this change is not necessary because you can add the News Id as a parameter for the Detail action. If I didn't understand your case correctly and there is something more, could you please send me a sample project that demonstrates the issue.

This thread is closed