HTTP/1.1 400 Bad Request

  • Thread starter turnit \(removethis\)
  • Start date
T

turnit \(removethis\)

I have a login form that uses the post method to carry the
information to the next page. The form works just fine in
ie6.0, but fails in mozilla and fails in ie5.2 on a
mac. "HTTP/1.1 400 Bad Request" was the original error msg
now that I reinstalled iislockdown and urscan I get "The
parameter is incorrect." If I use the get method with this
form it works just fine on everything. I can't say for
certain but I think this problem started after I installed
iislockdown and URLScan. I have since removed these apps
and reinstalled them as noted above. Anybody have any
ideas?

Hoss

p.s. here is my html code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0
Transitional//EN">

<html>
<head>
<title>Login</title>
</head>

<body>
<form name="LoginUser"
action="Login1.asp" method="post" enctype="application/x-
www-form-urlencoded">
<input type="hidden"
name="Process" value="Log Me In">
<table align="center"
border="0" width=100%>
<tr>
<td align="right"><font
face="Arial">User Name:</font></td>
<td><input type="Text"
name="User"></td>
</tr>
<tr>
<td align="right"><font
face="Arial">Password:</font></td>
<td><input type="Password"
name="Password"></td>
<tr><td colspan=2
align=center>
<input type="submit"
name="b1" value="Log Me In">
</td></tr>
</table>
</form>
<script
language="JavaScript">document.LoginUser.User.focus
();</script>


</body>
</html>
 
A

Aaron Bertrand [MVP]

Try taking out the enctype. The only time you need to specify the enctype
is if you are uploading binary data (e.g. a file).
 
A

Aaron Bertrand [MVP]

Okay great, what does your ASP code look like? I can't reproduce when I
copy the page locally and post it to itself.
 
G

Guest

I have the same issue I have another server that does not
have IISlockdown or URLScan installed and my form works
just fine in all browsers. Maybe this will help!

-----------------------------------------------------------
---------------------------------
The following was collected from a mac running ie5.2 --
failed
-----------------------------------------------------------
---------------------------------
9 13.459354 003085E596DC LOCAL HTTP Content-length:
Request (from client using port 21408) 206.124.10.32 SOL
IP
Frame: Base frame properties
Frame: Time of capture = 11/10/2003 13:56:37.463
Frame: Time delta from previous physical frame: 120173
microseconds
Frame: Frame number: 9
Frame: Total frame length: 128 bytes
Frame: Capture frame length: 128 bytes
Frame: Frame data: Number of data bytes remaining =
128 (0x0080)
ETHERNET: ETYPE = 0x0800 : Protocol = IP: DOD Internet
Protocol
ETHERNET: Destination address : 00D0B784864A
ETHERNET: .......0 = Individual address
ETHERNET: ......0. = Universally administered
address
ETHERNET: Source address : 003085E596DC
ETHERNET: .......0 = No routing information present
ETHERNET: ......0. = Universally administered
address
ETHERNET: Frame Length : 128 (0x0080)
ETHERNET: Ethernet Type : 0x0800 (IP: DOD Internet
Protocol)
ETHERNET: Ethernet Data: Number of data bytes
remaining = 114 (0x0072)
IP: ID = 0xA596; Proto = TCP; Len: 114
IP: Version = 4 (0x4)
IP: Header Length = 20 (0x14)
IP: Precedence = Routine
IP: Type of Service = Normal Service
IP: Total Length = 114 (0x72)
IP: Identification = 42390 (0xA596)
IP: Flags Summary = 2 (0x2)
IP: .......0 = Last fragment in datagram
IP: ......1. = Cannot fragment datagram
IP: Fragment Offset = 0 (0x0) bytes
IP: Time to Live = 236 (0xEC)
IP: Protocol = TCP - Transmission Control
IP: Checksum = 0xC87C
IP: Source Address = 206.124.10.32
IP: Destination Address = 64.58.7.156
IP: Data: Number of data bytes remaining = 94 (0x005E)
TCP: .AP..., len: 74, seq:2475344921-2475344995,
ack:4239387231, win:32768, src:21408 dst: 80
TCP: Source Port = 0x53A0
TCP: Destination Port = Hypertext Transfer Protocol
TCP: Sequence Number = 2475344921 (0x938AC419)
TCP: Acknowledgement Number = 4239387231 (0xFCAFEA5F)
TCP: Data Offset = 20 (0x14)
TCP: Reserved = 0 (0x0000)
TCP: Flags = 0x18 : .AP...
TCP: ..0..... = No urgent data
TCP: ...1.... = Acknowledgement field significant
TCP: ....1... = Push function
TCP: .....0.. = No Reset
TCP: ......0. = No Synchronize
TCP: .......0 = No Fin
TCP: Window = 32768 (0x8000)
TCP: Checksum = 0xE445
TCP: Urgent Pointer = 0 (0x0)
TCP: Data: Number of data bytes remaining = 74 (0x004A)
HTTP: Content-length: Request (from client using port
21408)
HTTP: Request Method = Content-length:
HTTP: Uniform Resource Identifier = 52
00000: 00 D0 B7 84 86 4A 00 30 85 E5 96 DC 08 00 45
00 .з??J.0?å?Ü..E.
00010: 00 72 A5 96 40 00 EC 06 C8 7C CE 7C 0A 20 40
3A .r¥?@.ì.È|Î|. @:
00020: 07 9C 53 A0 00 50 93 8A C4 19 FC AF EA 5F 50
18 .?S .P??Ä.ü¯ê_P.
00030: 80 00 E4 45 00 00 43 6F 6E 74 65 6E 74 2D 6C
65 ?.äE..Content-le
00040: 6E 67 74 68 3A 20 35 32 0D 0A 0D 0A 50 72 6F 63
ngth: 52....Proc
00050: 65 73 73 3D 4C 6F 67 2B 4D 65 2B 49 6E 26 55 73
ess=Log+Me+In&Us
00060: 65 72 3D 74 6F 6D 26 50 61 73 73 77 6F 72 64 3D
er=tom&Password=
00070: 74 6F 6D 26 62 31 3D 4C 6F 67 2B 4D 65 2B 49 6E
tom&b1=Log+Me+In

-----------------------------------------------------------
---------------------------------
The following was collected from mozilla -- failed
-----------------------------------------------------------
--------------------

7 12.708273 LOCAL TYAN C103CC3 HTTP Response (to client
using port 3150) SOL 64.58.7.154 IP
Frame: Base frame properties
Frame: Time of capture = 11/10/2003 14:1:33.249
Frame: Time delta from previous physical frame: 0
microseconds
Frame: Frame number: 7
Frame: Total frame length: 233 bytes
Frame: Capture frame length: 233 bytes
Frame: Frame data: Number of data bytes remaining =
233 (0x00E9)
ETHERNET: ETYPE = 0x0800 : Protocol = IP: DOD Internet
Protocol
ETHERNET: Destination address : 00E081103CC3
ETHERNET: .......0 = Individual address
ETHERNET: ......0. = Universally administered
address
ETHERNET: Source address : 00D0B784864A
ETHERNET: .......0 = No routing information present
ETHERNET: ......0. = Universally administered
address
ETHERNET: Frame Length : 233 (0x00E9)
ETHERNET: Ethernet Type : 0x0800 (IP: DOD Internet
Protocol)
ETHERNET: Ethernet Data: Number of data bytes
remaining = 219 (0x00DB)
IP: ID = 0x7C; Proto = TCP; Len: 219
IP: Version = 4 (0x4)
IP: Header Length = 20 (0x14)
IP: Precedence = Routine
IP: Type of Service = Normal Service
IP: Total Length = 219 (0xDB)
IP: Identification = 124 (0x7C)
IP: Flags Summary = 2 (0x2)
IP: .......0 = Last fragment in datagram
IP: ......1. = Cannot fragment datagram
IP: Fragment Offset = 0 (0x0) bytes
IP: Time to Live = 128 (0x80)
IP: Protocol = TCP - Transmission Control
IP: Checksum = 0x69F7
IP: Source Address = 64.58.7.156
IP: Destination Address = 64.58.7.154
IP: Data: Number of data bytes remaining = 199 (0x00C7)
TCP: .AP..., len: 179, seq: 18356498-18356677,
ack:4142894198, win:63522, src: 80 dst: 3150
TCP: Source Port = Hypertext Transfer Protocol
TCP: Destination Port = 0x0C4E
TCP: Sequence Number = 18356498 (0x1181912)
TCP: Acknowledgement Number = 4142894198 (0xF6EF8C76)
TCP: Data Offset = 20 (0x14)
TCP: Reserved = 0 (0x0000)
TCP: Flags = 0x18 : .AP...
TCP: ..0..... = No urgent data
TCP: ...1.... = Acknowledgement field significant
TCP: ....1... = Push function
TCP: .....0.. = No Reset
TCP: ......0. = No Synchronize
TCP: .......0 = No Fin
TCP: Window = 63522 (0xF822)
TCP: Checksum = 0xE5CA
TCP: Urgent Pointer = 0 (0x0)
TCP: Data: Number of data bytes remaining = 179
(0x00B3)
HTTP: Response (to client using port 3150)
HTTP: Protocol Version = HTTP/1.1
HTTP: Status Code = Bad Request
HTTP: Reason = Bad Request
HTTP: Undocumented Header = Content-Type: text/html
HTTP: Undocumented Header Fieldname = Content-Type
HTTP: Undocumented Header Value = text/html
HTTP: Undocumented Header = Content-Length: 87
HTTP: Undocumented Header Fieldname = Content-
Length
HTTP: Undocumented Header Value = 87
HTTP: Undocumented Header = Connection: close
HTTP: Undocumented Header Fieldname = Connection
HTTP: Undocumented Header Value = close
HTTP: Data: Number of data bytes remaining = 87
(0x0057)
00000: 00 E0 81 10 3C C3 00 D0 B7 84 86 4A 08 00 45
00 .à.<Ã.з??J..E.
00010: 00 DB 00 7C 40 00 80 06 69 F7 40 3A 07 9C 40
3A .Û.|@.?.i÷@:.?@:
00020: 07 9A 00 50 0C 4E 01 18 19 12 F6 EF 8C 76 50
18 .?.P.N....öï?vP.
00030: F8 22 E5 CA 00 00 48 54 54 50 2F 31 2E 31 20 34
ø"åÊ..HTTP/1.1 4
00040: 30 30 20 42 61 64 20 52 65 71 75 65 73 74 0D 0A
00 Bad Request..
00050: 43 6F 6E 74 65 6E 74 2D 54 79 70 65 3A 20 74 65
Content-Type: te
00060: 78 74 2F 68 74 6D 6C 0D 0A 43 6F 6E 74 65 6E 74
xt/html..Content
00070: 2D 4C 65 6E 67 74 68 3A 20 38 37 0D 0A 43 6F 6E -
Length: 87..Con
00080: 6E 65 63 74 69 6F 6E 3A 20 63 6C 6F 73 65 0D 0A
nection: close..
00090: 0D 0A 3C 68 74 6D 6C 3E 3C 68 65 61 64 3E 3C
74 ..<html><head><t
000A0: 69 74 6C 65 3E 45 72 72 6F 72 3C 2F 74 69 74 6C
itle>Error</titl
000B0: 65 3E 3C 2F 68 65 61 64 3E 3C 62 6F 64 79 3E 54
e></head><body>T
000C0: 68 65 20 70 61 72 61 6D 65 74 65 72 20 69 73 20
he parameter is
000D0: 69 6E 63 6F 72 72 65 63 74 2E 20 3C 2F 62 6F 64
incorrect. </bod
000E0: 79 3E 3C 2F 68 74 6D 6C 3E
y></html>

-----------------------------------------------------------
---------------------------------
The following was collected from ie6.0 - succeeded
-----------------------------------------------------------
---------------------------------

9 10.354889 000103D43A5A LOCAL HTTP POST Request (from
client using port 1980) 64.58.7.157 SOL IP
Frame: Base frame properties
Frame: Time of capture = 11/10/2003 1417:30.445
Frame: Time delta from previous physical frame: 0
microseconds
Frame: Frame number: 9
Frame: Total frame length: 674 bytes
Frame: Capture frame length: 674 bytes
Frame: Frame data: Number of data bytes remaining =
674 (0x02A2)
ETHERNET: ETYPE = 0x0800 : Protocol = IP: DOD Internet
Protocol
ETHERNET: Destination address : 00D0B784864A
ETHERNET: .......0 = Individual address
ETHERNET: ......0. = Universally administered
address
ETHERNET: Source address : 000103D43A5A
ETHERNET: .......0 = No routing information present
ETHERNET: ......0. = Universally administered
address
ETHERNET: Frame Length : 674 (0x02A2)
ETHERNET: Ethernet Type : 0x0800 (IP: DOD Internet
Protocol)
ETHERNET: Ethernet Data: Number of data bytes
remaining = 660 (0x0294)
IP: ID = 0xBDEB; Proto = TCP; Len: 660
IP: Version = 4 (0x4)
IP: Header Length = 20 (0x14)
IP: Precedence = Routine
IP: Type of Service = Normal Service
IP: Total Length = 660 (0x294)
IP: Identification = 48619 (0xBDEB)
IP: Flags Summary = 2 (0x2)
IP: .......0 = Last fragment in datagram
IP: ......1. = Cannot fragment datagram
IP: Fragment Offset = 0 (0x0) bytes
IP: Time to Live = 128 (0x80)
IP: Protocol = TCP - Transmission Control
IP: Checksum = 0xAACB
IP: Source Address = 64.58.7.157
IP: Destination Address = 64.58.7.156
IP: Data: Number of data bytes remaining = 640 (0x0280)
TCP: .AP..., len: 620, seq:1601960524-1601961144, ack:
258216615, win:65535, src: 1980 dst: 80
TCP: Source Port = 0x07BC
TCP: Destination Port = Hypertext Transfer Protocol
TCP: Sequence Number = 1601960524 (0x5F7BFA4C)
TCP: Acknowledgement Number = 258216615 (0xF6412A7)
TCP: Data Offset = 20 (0x14)
TCP: Reserved = 0 (0x0000)
TCP: Flags = 0x18 : .AP...
TCP: ..0..... = No urgent data
TCP: ...1.... = Acknowledgement field significant
TCP: ....1... = Push function
TCP: .....0.. = No Reset
TCP: ......0. = No Synchronize
TCP: .......0 = No Fin
TCP: Window = 65535 (0xFFFF)
TCP: Checksum = 0x0DD9
TCP: Urgent Pointer = 0 (0x0)
TCP: Data: Number of data bytes remaining = 620
(0x026C)
HTTP: POST Request (from client using port 1980)
HTTP: Request Method = POST
HTTP: Uniform Resource Identifier = /admin/Login.asp
HTTP: Protocol Version = HTTP/1.1
HTTP: Undocumented Header = Accept: image/gif, image/x-
xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-
flash, */*
HTTP: Undocumented Header Fieldname = Accept
HTTP: Undocumented Header Value = image/gif,
image/x-xbitmap, image/jpeg, image/pjpe
HTTP: Undocumented Header = Referer:
http://admin.nohasslesites.com/admin/Login.asp
HTTP: Undocumented Header Fieldname = Referer
HTTP: Undocumented Header Value =
http://admin.nohasslesites.com/admin/Login.asp
HTTP: Undocumented Header = Accept-Language: en-us
HTTP: Undocumented Header Fieldname = Accept-
Language
HTTP: Undocumented Header Value = en-us
HTTP: Undocumented Header = Content-Type:
application/x-www-form-urlencoded
HTTP: Undocumented Header Fieldname = Content-Type
HTTP: Undocumented Header Value = application/x-
www-form-urlencoded
HTTP: Undocumented Header = Accept-Encoding: gzip,
deflate
HTTP: Undocumented Header Fieldname = Accept-
Encoding
HTTP: Undocumented Header Value = gzip, deflate
HTTP: Undocumented Header = User-Agent: Mozilla/4.0
(compatible; MSIE 5.5; Windows NT 5.0)
HTTP: Undocumented Header Fieldname = User-Agent
HTTP: Undocumented Header Value = Mozilla/4.0
(compatible; MSIE 5.5; Windows NT 5.0)
HTTP: Undocumented Header = Host:
admin.nohasslesites.com
HTTP: Undocumented Header Fieldname = Host
HTTP: Undocumented Header Value =
admin.nohasslesites.com
HTTP: Undocumented Header = Content-Length: 61
HTTP: Undocumented Header Fieldname = Content-
Length
HTTP: Undocumented Header Value = 61
HTTP: Undocumented Header = Connection: Keep-Alive
HTTP: Undocumented Header Fieldname = Connection
HTTP: Undocumented Header Value = Keep-Alive
HTTP: Undocumented Header = Cache-Control: no-cache
HTTP: Undocumented Header Fieldname = Cache-Control
HTTP: Undocumented Header Value = no-cache
HTTP: Undocumented Header = Cookie:
ASPSESSIONIDQCADRQSD=ABPHFIPDGJBKBLPFFOHBHGDA;
ASPSESSIONIDASTCSRQC=JHAFHNPDABJHGEKOIGAINKDI
HTTP: Undocumented Header Fieldname = Cookie
HTTP: Undocumented Header Value =
ASPSESSIONIDQCADRQSD=ABPHFIPDGJBKBLPFFOHBHGDA; ASP
HTTP: Data: Number of data bytes remaining = 61
(0x003D)
00000: 00 D0 B7 84 86 4A 00 01 03 D4 3A 5A 08 00 45
00 .з??J...Ô:Z..E.
00010: 02 94 BD EB 40 00 80 06 AA CB 40 3A 07 9D 40
3A .?½ë@.?.ªË@:.@:
00020: 07 9C 07 BC 00 50 5F 7B FA 4C 0F 64 12 A7 50
18 .?.¼.P_{úL.d.§P.
00030: FF FF 0D D9 00 00 50 4F 53 54 20 2F 61 64 6D 69
ÿÿ.Ù..POST /admi
00040: 6E 2F 4C 6F 67 69 6E 2E 61 73 70 20 48 54 54 50
n/Login.asp HTTP
00050: 2F 31 2E 31 0D 0A 41 63 63 65 70 74 3A 20 69
6D /1.1..Accept: im
00060: 61 67 65 2F 67 69 66 2C 20 69 6D 61 67 65 2F 78
age/gif, image/x
00070: 2D 78 62 69 74 6D 61 70 2C 20 69 6D 61 67 65 2F -
xbitmap, image/
00080: 6A 70 65 67 2C 20 69 6D 61 67 65 2F 70 6A 70 65
jpeg, image/pjpe
00090: 67 2C 20 61 70 70 6C 69 63 61 74 69 6F 6E 2F 78
g, application/x
000A0: 2D 73 68 6F 63 6B 77 61 76 65 2D 66 6C 61 73 68 -
shockwave-flash
000B0: 2C 20 2A 2F 2A 0D 0A 52 65 66 65 72 65 72 3A
20 , */*..Referer:
000C0: 68 74 74 70 3A 2F 2F 61 64 6D 69 6E 2E 6E 6F 68
http://admin.noh
000D0: 61 73 73 6C 65 73 69 74 65 73 2E 63 6F 6D 2F 61
asslesites.com/a
000E0: 64 6D 69 6E 2F 4C 6F 67 69 6E 2E 61 73 70 0D 0A
dmin/Login.asp..
000F0: 41 63 63 65 70 74 2D 4C 61 6E 67 75 61 67 65 3A
Accept-Language:
00100: 20 65 6E 2D 75 73 0D 0A 43 6F 6E 74 65 6E 74 2D
en-us..Content-
00110: 54 79 70 65 3A 20 61 70 70 6C 69 63 61 74 69 6F
Type: applicatio
00120: 6E 2F 78 2D 77 77 77 2D 66 6F 72 6D 2D 75 72 6C
n/x-www-form-url
00130: 65 6E 63 6F 64 65 64 0D 0A 41 63 63 65 70 74 2D
encoded..Accept-
00140: 45 6E 63 6F 64 69 6E 67 3A 20 67 7A 69 70 2C 20
Encoding: gzip,
00150: 64 65 66 6C 61 74 65 0D 0A 55 73 65 72 2D 41 67
deflate..User-Ag
00160: 65 6E 74 3A 20 4D 6F 7A 69 6C 6C 61 2F 34 2E 30
ent: Mozilla/4.0
00170: 20 28 63 6F 6D 70 61 74 69 62 6C 65 3B 20 4D 53
(compatible; MS
00180: 49 45 20 35 2E 35 3B 20 57 69 6E 64 6F 77 73 20
IE 5.5; Windows
00190: 4E 54 20 35 2E 30 29 0D 0A 48 6F 73 74 3A 20 61
NT 5.0)..Host: a
001A0: 64 6D 69 6E 2E 6E 6F 68 61 73 73 6C 65 73 69 74
dmin.nohasslesit
001B0: 65 73 2E 63 6F 6D 0D 0A 43 6F 6E 74 65 6E 74 2D
es.com..Content-
001C0: 4C 65 6E 67 74 68 3A 20 36 31 0D 0A 43 6F 6E 6E
Length: 61..Conn
001D0: 65 63 74 69 6F 6E 3A 20 4B 65 65 70 2D 41 6C 69
ection: Keep-Ali
001E0: 76 65 0D 0A 43 61 63 68 65 2D 43 6F 6E 74 72 6F
ve..Cache-Contro
001F0: 6C 3A 20 6E 6F 2D 63 61 63 68 65 0D 0A 43 6F 6F
l: no-cache..Coo
00200: 6B 69 65 3A 20 41 53 50 53 45 53 53 49 4F 4E 49
kie: ASPSESSIONI
00210: 44 51 43 41 44 52 51 53 44 3D 41 42 50 48 46 49
DQCADRQSD=ABPHFI
00220: 50 44 47 4A 42 4B 42 4C 50 46 46 4F 48 42 48 47
PDGJBKBLPFFOHBHG
00230: 44 41 3B 20 41 53 50 53 45 53 53 49 4F 4E 49 44
DA; ASPSESSIONID
00240: 41 53 54 43 53 52 51 43 3D 4A 48 41 46 48 4E 50
ASTCSRQC=JHAFHNP
00250: 44 41 42 4A 48 47 45 4B 4F 49 47 41 49 4E 4B 44
DABJHGEKOIGAINKD
00260: 49 0D 0A 0D 0A 50 72 6F 63 65 73 73 3D 4C 6F 67
I....Process=Log
00270: 2B 4D 65 2B 49 6E 26 55 73 65 72 3D 68 6F 73 73
+Me+In&User=hoss
00280: 26 50 61 73 73 77 6F 72 00 00 00 00 00 00 00 00
&Password=@@@@@@
00290: 00 00 00 00 00 00 00 31 3D 4C 6F 67 2B 4D 65 2B
@@@@@&b1=Log+Me+
002A0: 49 6E
In
 
A

Aaron Bertrand - MVP

No, a trace like that does not really help here.

Again, WHAT DOES YOUR ASP CODE LOOK LIKE???


I have the same issue I have another server that does not
have IISlockdown or URLScan installed and my form works
just fine in all browsers. Maybe this will help!
 
T

turnit \(removethis\)

I'm sorry for the confusion, and I thank you for your
time, but I think my problem is not ASP related, but IIS
related. The fact that my IIS server does not correctly
interpret post data is the problem. So once again thank
you for your time, but I will try and post this problem on
a newsgroup that is more closely related.

Hoss
 

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,772
Messages
2,569,588
Members
45,100
Latest member
MelodeeFaj
Top