2

I'm creating an MVC application that's following a RESTful URL approach.

I am experiencing the following 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

This error occurs when my URL length >= 225 chars. Surely I can have much longer URLs without this problem. Doesn’t this relate to file paths rather than URLs?

Is there a way around it?

mustaccio
  • 18,234
  • 16
  • 48
  • 57
JGilmartin
  • 8,683
  • 14
  • 66
  • 85

2 Answers2

1

Apparently there is a problem with aspnet_isapi.dll as indicated at ASP.NET url MAX_PATH limit. Fortunately, it appears that it will be addressed in a future version of .NET.

Community
  • 1
  • 1
tvanfosson
  • 524,688
  • 99
  • 697
  • 795
  • hey, thanks for the sugestion - but this issue is a problem with asp.net MVC rather than IIS - http://stackoverflow.com/questions/1185739/asp-net-mvc-url-routing-maximum-path-url-length what im going to have to do is lose all the / and replace with old skool query strings – JGilmartin Mar 27 '10 at 14:26
  • Hadn't run into that before. I've updated and linked to Phil Haack's answer to a related question indicating that it will be fixed in a future version of .NET. Probably wasn't a problem before MVC because WebForms didn't support REST very well. – tvanfosson Mar 27 '10 at 14:54
0

looks like this is a known issue, as soon i i lost some of the / in my URL it worked - ASP.NET MVC, Url Routing: Maximum Path (URL) Length

Community
  • 1
  • 1
JGilmartin
  • 8,683
  • 14
  • 66
  • 85