I originally posted this question in
microsoft.public.dotnet.framework.aspnet but after kicking it around for a couple of days, one of the MVPs there suggested to post it here. Please click the link above to see what was already tried. Here is the original post:
************
Using IIS7, Vista x64, ASP.NET 2.0.
I am getting HTTP 400 "Bad Request" for the following URL:
/HTTPVPNWebPortal/62ccc22e-069b-441e-b9f0-83b45e7f4f1e/UdVpnSGFuZGxlcnMvQ292ZXJBcnQuYXNoeD9DJTNhJTVjRG9jdW1lbnRzK2FuZCtTZXR0aW5ncyU1Y011c2hyb29tJTVjTXkrRG9jdW1lbnRzJTVjTXkrTXVzaWMlNWNGcmVuY2glNWNBbWVpbGUlNWNZYW5uK1RpZXJzZW4rLStMYStOb3llZS5tcDM=/SecureTunnel.axd
Here's what makes difference:
- URL length: As soon as I make this URL two chars shorter - HTTP 400 error
goes away. Note that length of the first URL segment - the application name
(HTTPVPNWebPortal) - is irrelevant. App name's length makes no different -
only the rest of the URL does. Also splitting URL into more segments by
adding '/' to it makes no difference either.
- Changing URL resource extension from .AXD to .HTM makes 400 go away, so looks
like it's an ASP.NET thing. Changing the extension to .ASPX brings error back.
My question is this: is it possible to configure ASP.NET to allow longer
URLs for .ASPX and .AXD resources?
The .Net Framework has a restriction of MAX_PATH (260) characters on physical path and so asp.net has a similar restriction on urls - there is no way to get around this restriction.
Anil Ruia
Software Design Engineer
IIS Core Server
Do you know if this is fixed in the .NET 4.0 framework? If so I could fix this problem by upgrading my app to .net 4.0 rather than spend time working out a hack to handle the long URLs I have in my MVC 2.0 app.
vgribok
8 Posts
ASP.NET 2.0 maximum URL length?
May 01, 2007 02:13 PM|LINK
I originally posted this question in microsoft.public.dotnet.framework.aspnet but after kicking it around for a couple of days, one of the MVPs there suggested to post it here. Please click the link above to see what was already tried. Here is the original post:
************
Using IIS7, Vista x64, ASP.NET 2.0.
I am getting HTTP 400 "Bad Request" for the following URL:
/HTTPVPNWebPortal/62ccc22e-069b-441e-b9f0-83b45e7f4f1e/UdVpnSGFuZGxlcnMvQ292ZXJBcnQuYXNoeD9DJTNhJTVjRG9jdW1lbnRzK2FuZCtTZXR0aW5ncyU1Y011c2hyb29tJTVjTXkrRG9jdW1lbnRzJTVjTXkrTXVzaWMlNWNGcmVuY2glNWNBbWVpbGUlNWNZYW5uK1RpZXJzZW4rLStMYStOb3llZS5tcDM=/SecureTunnel.axd
Here's what makes difference:
- URL length: As soon as I make this URL two chars shorter - HTTP 400 error
goes away. Note that length of the first URL segment - the application name
(HTTPVPNWebPortal) - is irrelevant. App name's length makes no different -
only the rest of the URL does. Also splitting URL into more segments by
adding '/' to it makes no difference either.
- Changing URL resource extension from .AXD to .HTM makes 400 go away, so looks
like it's an ASP.NET thing. Changing the extension to .ASPX brings error back.
My question is this: is it possible to configure ASP.NET to allow longer
URLs for .ASPX and .AXD resources?
Thank you,
--
Vlad Hrybok
http://UltiDev.com
maxUrl
anilr
2343 Posts
Microsoft
Re: ASP.NET 2.0 maximum URL length?
May 01, 2007 03:22 PM|LINK
Software Design Engineer
IIS Core Server
joellister
1 Post
Re: ASP.NET 2.0 maximum URL length?
Apr 21, 2010 02:12 PM|LINK
Do you know if this is fixed in the .NET 4.0 framework? If so I could fix this problem by upgrading my app to .net 4.0 rather than spend time working out a hack to handle the long URLs I have in my MVC 2.0 app.
moredotnet
1 Post
Re: ASP.NET 2.0 maximum URL length?
May 10, 2010 11:08 AM|LINK
Yes, this issue is now fixed in ASP.NET 4.0. Read this link for more: http://www.asp.net/Learn/whitepapers/aspnet4#0.2__Toc253429244
Cheers
Vishal K Khanna
http://www.dotnetuncle.com
BOOK: .NET INTERVIEW CRACKERJACK
WEBSITE: ASP.NET, C#, AJAX, SQL, Design Patterns