Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Fuji Kusaka 2203 posts 4220 karma points
    Jun 28, 2016 @ 10:27
    Fuji Kusaka
    1

    Hi Guys,

    Has anyone had this issue with number of characters in v7 ? We have the same url in v4 and never uncountered this before.

    This is on a russian website where we are using Cyrillic Chracters...

    This is the error

    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.
    

    Any suggestions ?

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Jun 28, 2016 @ 10:35
    Douglas Robar
    1

    What's the url to the page with the problem, as shown on the 'Properties' tab of the content page?

    Here's a thought... if you've got unicode characters realize that a browser might encode the url and it can become massively longer in some cases. Looking at the browser's inspector tools shows for the actual url request that fails may show it is longer than what appears on the browser url bar. Punycode, for instance, does this (https://www.punycoder.com/) and browsers hide those details from the visitor and just convert unicode for you without alerting you.

    cheers,
    doug.

  • Fuji Kusaka 2203 posts 4220 karma points
    Jun 28, 2016 @ 10:54
    Fuji Kusaka
    0

    Hi Doug, thanks for the feedback.

    Yes indeed we are getting a very long url as below

    ru/%D1%81%D0%BF%D0%B5%D1%86%D0%B8%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B5-%D0%BF%D1%80%D0%B5%D0%B4%D0%BB%D0%BE%D0%B6%D0%B5%D0%BD%D0%B8%D1%8F/%D0%BA%D0%BE%D0%BC%D0%B1%D0%B8%D0%BD%D0%B0%D1%86%D0%B8%D1%8F-%D0%BE%D1%82%D0%B5%D0%BB%D0%B5%D0%B9
    

    Will surely give a punycode a try a let you know.

    Thanks,

  • Nik 1599 posts 7179 karma points MVP 6x c-trib
    Jun 28, 2016 @ 10:55
    Nik
    0

    That looks to me like it's a server side error rather than a "web" error. Is it possible that you are storing files/creating files on your server where the fully file path is exceeding the windows limitation of 260 characters?

    Without more context, it's a bit hard to identify the cause but it could simply be changes in how data is stored between v4 and v7?

    I don't think it is a URL issue as

    Maximum URL length is 2,083 characters in Internet Explorer

    Source: Stackverflow - Max length of URL

  • Arnaud VATEL 6 posts 78 karma points
    Jun 28, 2016 @ 15:00
    Arnaud VATEL
    2

    Hi Fuji,

    we already met the case !

    You can modify this in system.web section of the web.config with the following parameters :

    <httpRuntime maxUrlLength="1024" relaxedUrlToFileSystemMapping="true"/>
    

    Setting relaxedUrlToFileSystemMapping to "true" can be considered as a security threat by somes but it does not seem to be a big deal. Scott Hanselman talks about that here : http://www.hanselman.com/blog/ExperimentsInWackinessAllowingPercentsAnglebracketsAndOtherNaughtyThingsInTheASPNETIISRequestURL.aspx

    Hope it helps ! A bientôt Fuji :)

  • Fuji Kusaka 2203 posts 4220 karma points
    Jun 29, 2016 @ 06:10
    Fuji Kusaka
    1

    Hey Arnaud,

    Yes got it working, we actually updated the web.config as below.

    <httpRuntime requestValidationMode="2.0" enableVersionHeader="false" targetFramework="4.5" maxRequestLength="51200" relaxedUrlToFileSystemMapping="true" maxUrlLength="1024" maxQueryStringLength="2000" fcnMode="Single" />
    

    Comment ta fait avec ton chapiteau en passant ? :) Merci / Thank you

  • Arnaud VATEL 6 posts 78 karma points
    Jun 29, 2016 @ 08:09
    Arnaud VATEL
    0

    Le château n'est pas encore arrivé ;)

    A bientôt Fuji

Please Sign in or register to post replies

Write your reply to:

Draft