Aug 01, 2013 09:37 AM|Rushdy|LINK
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
<system.web> <compilation debug="true" targetFramework="4.5" /> <httpRuntime maxUrlLength="6144" relaxedUrlToFileSystemMapping="true" /> <authentication mode="None" /> <pages> <namespaces> <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" /> </namespaces> </pages>
but still it not working for url is larger than 260 appreciate all your help
httphandler httpmodule webapi
Aug 01, 2013 10:04 AM|ramu.net|LINK
Hi,
May below links will help you
httphandler httpmodule webapi
All-Star
113100 Points
MVP
Aug 01, 2013 10:20 AM|Rion Williams|LINK
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?
httphandler httpmodule webapi
Nov 21, 2013 04:27 PM|NemRod|LINK
Even if you have defined maxUrlLength="1024", or something, the parameter of MVC map route is always 260, thai is
url: "{controller}/{action}/{id}", then id can not be longer that 260, on the other hand url can be maxUrlLength chars.
if you like send a string grater than 260 in single parameter (maybe is something strange), you can divide...
Create a route; url: "{controller}/{action}/{id1}/{id2} ...
That´s is an aproach.
260
httphandler httpmodule webapi
3 replies
Last post Nov 21, 2013 04:27 PM by NemRod