2011-07-13 74 views
0

我试图创建HTTP服务到XML服务,我从IIS服务器收到400错误。在IIS 6.0上的HTTP 400

此请求的工作原理:

T 192.168.0.10:52584 -> 193.189.144.141:80 [AP] 
    50 4f 53 54 20 2f 73 63 72 69 70 74 73 2f 58 4d POST /scripts/XM 
    4c 5f 49 6e 74 65 72 66 61 63 65 2e 64 6c 6c 20 L_Interface.dll 
    48 54 54 50 2f 31 2e 30 0d 0a      HTTP/1.0..  
### 
T 192.168.0.10:52584 -> 193.189.144.141:80 [AP] 
    48 6f 73 74 3a 20 77 77 77 31 2e 67 6e 74 2e 6c Host: www1.gnt.l 
    74 0d 0a 43 6f 6e 74 65 6e 74 2d 74 79 70 65 3a t..Content-type: 
    20 61 70 70 6c 69 63 61 74 69 6f 6e 2f 78 2d 77  application/x-w 
    77 77 2d 66 6f 72 6d 2d 75 72 6c 65 6e 63 6f 64 ww-form-urlencod 
    65 64 0d 0a 43 6f 6e 74 65 6e 74 2d 6c 65 6e 67 ed..Content-leng 
    74 68 3a 20 37 33 0d 0a 43 6f 6e 6e 65 63 74 69 th: 73..Connecti 
    6f 6e 3a 20 63 6c 6f 73 65 0d 0a 0d 0a 4d 66 63 on: close....Mfc 
    49 53 41 50 49 43 6f 6d 6d 61 6e 64 3d 44 65 66 ISAPICommand=Def 
    61 75 6c 74 26 55 53 45 52 4e 41 4d 45 3d 73 65 ault&USERNAME=se 
    63 72 65 74 26 50 41 53 53 57 4f 52 44 3d 73 65 cret&PASSWORD=se 
    63 72 65 74 26 43 48 45 43 4b 3d 73 65 63 72 65 cret&CHECK=secre 
    74 26 58 4d 4c 3d 0d 0a 0d 0a      t&XML=.... 

虽然这一个不工作:

T 192.168.0.10:52592 -> 193.189.144.141:80 [AP] 
    50 4f 53 54 20 2f 73 63 72 69 70 74 73 2f 58 4d POST /scripts/XM 
    4c 5f 49 6e 74 65 72 66 61 63 65 2e 64 6c 6c 20 L_Interface.dll 
    48 54 54 50 2f 31 2e 30 0d 0a 43 6f 6e 74 65 6e HTTP/1.0..Conten 
    74 2d 54 79 70 65 3a 20 61 70 70 6c 69 63 61 74 t-Type: applicat 
    69 6f 6e 2f 78 2d 77 77 77 2d 66 6f 72 6d 2d 75 ion/x-www-form-u 
    72 6c 65 6e 63 6f 64 65 64 0d 0a 43 6f 6e 74 65 rlencoded..Conte 
    6e 74 2d 4c 65 6e 67 74 68 3a 20 37 32 0d 0a 48 nt-Length: 72..H 
    6f 73 74 3a 20 77 77 77 31 2e 67 6e 74 2e 6c 74 ost: www1.gnt.lt 
    0d 0a 55 73 65 72 2d 41 67 65 6e 74 3a 20 50 79 ..User-Agent: Py 
    74 68 6f 6e 2d 75 72 6c 6c 69 62 2f 31 2e 31 37 thon-urllib/1.17 
    0d 0a 0d 0a 58 4d 4c 3d 26 55 53 45 52 4e 41 4d ....XML=&USERNAM 
    45 3d 73 65 63 72 65 74 26 50 41 53 53 57 4f 52 E=secret&PASSWOR 
    44 3d 73 65 63 72 65 74 26 4d 66 63 49 53 41 50 D=secret&MfcISAP 
    49 43 6f 6d 6d 61 6e 64 3d 44 65 66 61 75 6c 74 ICommand=Default 
    26 43 48 45 43 4b 3d 63 68 65 63 6b    &CHECK=check 

确切的错误信息:

HTTP/1.1 400 Bad Request. 
Server: Microsoft-IIS/6.0. 
X-Powered-By: ASP.NET. 
Date: Wed, 13 Jul 2011 20:53:07 GMT. 
Connection: close. 
. 

任何想法在哪里的问题?

回答

0

通过改变参数的顺序来解决。

制造MfcISAP=Default第一个参数