HTTP/1.1 400 when GET request length is over 260 bytes

H

Håkan

Hi!

I get HTTP/1.1 400 Bad Request when I try to access a aspx-page running on
server 2003 SP1 from internet explorer 6 running on the same machine.

Here is the URL I am using:

http://www.myserver.com/20th-Centur...ed-by-Paolo-Pallucco-for-Pallucco-Italia.aspx

If I reduce the length of the URL below 260 bytes, then I get a page missing
error (which is good, since it indicates that it passes through whatever
check is preventing it from working)

I get the impression that the aspx-engine never kicks in and that the 400
response is generated from within IIS. As far as I know an URL should be
able to be over 2k bytes.
I know that the URLScan utility (which is not installed) has a limitation on
the URL on 260 bytes...

the URL has been URL-Encoded (Server.URLEncode) so no invalid characters
should be in the URL. (I get the same error if I remove the '-character)

/Håkan
 
B

bruce barker \(sqlwork.com\)

long url's usually have long arguments. you are probably hitting limits on
the max length of a directory name or filename (255).

-- bruce (sqlwork.com)
 
H

Håkan

It is not a real path on the disk. I am using Context.RewritePath(), so the
path has nothing to do with the physical layout of the disk. The file
requested does not even exist as a physical file on the file system, and it
works fine as long as the request does not go over 260 bytes

/H
 
M

M. Burnett

Check the metabase values for these settings:
AspMaxRequestEntityAllowed
MaxRequestEntityAllowed

And also check the registry key
HKLM/CurrentControlSet/Services/HTTP/Parameters
for these values:

MaxRequestBytes
UrlSegmentMaxLength
UrlSegmentMaxCount
MaxFieldLength



Mark
 
H

Håkan

Here are the values:

METABASE
AspMaxRequestEntityAllowed="204800"
MaxRequestEntityAllowed [Does not exist in the metabase]

REGISTRY
None of these parameters exist under the key:
HKLM/System/CurrentControlSet/Services/HTTP/Parameters

MaxRequestBytes
UrlSegmentMaxLength
UrlSegmentMaxCount
MaxFieldLength


Nothing of this seams to limit the URL to 260 bytes...

/H
 
M

M. Burnett

There are various API's that have hard-coded path limits of 260 bytes.
It might just be that IIS is limiting the path based on the buffer
allocated for those API calls. It might just be easier to shorten your
paths.


Mark




Here are the values:

METABASE
AspMaxRequestEntityAllowed="204800"
MaxRequestEntityAllowed [Does not exist in the metabase]

REGISTRY
None of these parameters exist under the key:
HKLM/System/CurrentControlSet/Services/HTTP/Parameters

MaxRequestBytes
UrlSegmentMaxLength
UrlSegmentMaxCount
MaxFieldLength


Nothing of this seams to limit the URL to 260 bytes...

/H

Check the metabase values for these settings:
AspMaxRequestEntityAllowed
MaxRequestEntityAllowed

And also check the registry key
HKLM/CurrentControlSet/Services/HTTP/Parameters
for these values:

MaxRequestBytes
UrlSegmentMaxLength
UrlSegmentMaxCount
MaxFieldLength



Mark





the
should
 
W

Wade A. Hilmo [MS]

Hello All,

This is not an IIS limitation. It is an ASP.NET limitation (and ASPI.NET, I
believe, inherits it from the CLR.) Unfortunately, it is hard coded.

Thank you,
-Wade A. Hilmo,
-Microsoft

M. Burnett said:
There are various API's that have hard-coded path limits of 260 bytes.
It might just be that IIS is limiting the path based on the buffer
allocated for those API calls. It might just be easier to shorten your
paths.


Mark




Here are the values:

METABASE
AspMaxRequestEntityAllowed="204800"
MaxRequestEntityAllowed [Does not exist in the metabase]

REGISTRY
None of these parameters exist under the key:
HKLM/System/CurrentControlSet/Services/HTTP/Parameters

MaxRequestBytes
UrlSegmentMaxLength
UrlSegmentMaxCount
MaxFieldLength


Nothing of this seams to limit the URL to 260 bytes...

/H

Check the metabase values for these settings:
AspMaxRequestEntityAllowed
MaxRequestEntityAllowed

And also check the registry key
HKLM/CurrentControlSet/Services/HTTP/Parameters
for these values:

MaxRequestBytes
UrlSegmentMaxLength
UrlSegmentMaxCount
MaxFieldLength



Mark
It is not a real path on the disk. I am using Context.RewritePath(), so
the
path has nothing to do with the physical layout of the disk. The file
requested does not even exist as a physical file on the file system, and
it
works fine as long as the request does not go over 260 bytes

/H

"bruce barker (sqlwork.com)"
wrote
in message
long url's usually have long arguments. you are probably hitting
limits on
the max length of a directory name or filename (255).

-- bruce (sqlwork.com)
Hi!

I get HTTP/1.1 400 Bad Request when I try to access a aspx-page

on server 2003 SP1 from internet explorer 6 running on the same


Here is the URL I am using:


http://www.myserver.com/20th-Century-Design/1900-talsdesign/Interior-des
ign/Mid-century-modern/midcentury/Mid-century-design/midcentury-modern/M
odern-Design/Modernism/Vintage-design/Img/508_1_632651758409835000/Arm-c
hair-Barbera-d'Argento-Designed-by-Paolo-Pallucco-for-Pallucco-Italia.as


If I reduce the length of the URL below 260 bytes, then I get a page
missing error (which is good, since it indicates that it passes

whatever check is preventing it from working)

I get the impression that the aspx-engine never kicks in and that the


response is generated from within IIS. As far as I know an URL should


able to be over 2k bytes.
I know that the URLScan utility (which is not installed) has a

on the URL on 260 bytes...

the URL has been URL-Encoded (Server.URLEncode) so no invalid

should be in the URL. (I get the same error if I remove the
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,740
Latest member
JudsonFrie

Latest Threads

Top