httpRuntime maxUrlLength="6144" not working more than 260 characters RRS feed

  • Question

  • User1501783605 posted

    hello there

    i am working on a visual studio 2012  mvc 4.5 web api project 

    api working fine when the url is less than 260 but what i wanted to increase the size of the url to allow up to 6144 i have change the web config file to as bellow 

        <compilation debug="true" targetFramework="4.5" />
        <httpRuntime maxUrlLength="6144" relaxedUrlToFileSystemMapping="true" />
        <authentication mode="None" />
            <add namespace="System.Web.Helpers" />
            <add namespace="System.Web.Mvc" />
            <add namespace="System.Web.Mvc.Ajax" />
            <add namespace="System.Web.Mvc.Html" />
            <add namespace="System.Web.Optimization" />
            <add namespace="System.Web.Routing" />
            <add namespace="System.Web.WebPages" />

    but still it not working for url is larger than 260 appreciate  all your help 

    Thursday, August 1, 2013 9:37 AM


  • User281315223 posted

    Are you receiving any kind of exception (such as a PathTooLong exception)?

    If you are receiving a PathTooLong exception, then the fix that you mentioned :

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

    should work.

    However, this could also be an issue with the path that you are using and if it has any issues or invalid syntax within it (such as incorrect slashes) then this error could also be caused by that.

    Do you have an example of one of the paths that you are using?

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, August 1, 2013 10:20 AM

All replies