WCAT对所有请求返回400个错误请求?

WCAT对所有请求返回400个错误请求?

问题描述:

我发布了这个在IIS论坛,但一直没有答复。所以我想我会在这里尝试。WCAT对所有请求返回400个错误请求?

我之前使用WCAT 5.2,并且工作正常。我试图在本地机器上运行客户端和服务器以及IIS 7。由于某种原因,我请求的每个网址的状态始终为400(错误的请求)当我查看htterr日志时,原因是Hostname ???

从HTTPERR登录:

#Fields: date time c-ip c-port s-ip s-port cs-version cs-method cs-uri sc-status s-siteid s-reason s-queuename 2010-10-06 04:02:15 127.0.0.1 43252 127.0.0.1 80 HTTP/1.1 GET /ds/test.html 400 - Hostname -

埃克命令

wcat.wsf -terminate -run -t uad.ubr -f settings.ubr -singleip -x 

Settings.ubr

settings 
{ 

    clientfile  = "uad.ubr"; 
    server   = "localhost"; 
    clients  = 1; 
    virtualclients = 10; 

    counters 
    { 
     interval = 10; 

     counter = "Processor(_Total)\\% Processor Time"; 
     counter = "Processor(_Total)\\% Privileged Time"; 
     counter = "Processor(_Total)\\% User Time"; 
     counter = "Processor(_Total)\\Interrupts/sec"; 

     counter = "Memory\\Available KBytes"; 

     counter = "Process(w3wp)\\Working Set"; 

     counter = "System\\Context Switches/sec"; 
     counter = "System\\System Calls/sec"; 

     counter = "Web Service(_Total)\\Bytes Received/sec" ; 
     counter = "Web Service(_Total)\\Bytes Sent/sec" ; 
     counter = "Web Service(_Total)\\Connection Attempts/sec" ; 
     counter = "Web Service(_Total)\\Get Requests/sec" ; 
    } 

    registry 
    { 
     path = "System\\CurrentControlSet\\Control\\FileSystem"; 
     name = "NtfsDisableLastAccessUpdate"; 
     type = REG_DWORD; 
    } 

    registry 
    { 
     path = "System\\CurrentControlSet\\Services\\Tcpip\\Parameters"; 
     name = "SynAttackProtect"; 
     type = REG_DWORD; 
    } 
} 

客户端文件(uad.ubr)

scenario 
{ 
    warmup  = 5; 
    duration = 10; 
    cooldown = 5; 

    default 
    { 
     // HTTP1.1 request 
     version = HTTP11; 
    } 

    transaction 
    { 
     id = "1"; 
     weight = 1; 

     request 
     { 
      url = "/ds/test.html"; 
     } 
    } 
} 

服务器,因为某些头信息丢失返回400错误的请求,你需要一个“主机”添加到请求元素。

request 
{   
     url = "/ds/test.html"; 

     setHeader 
     { 
      name = "Host"; 
      value = "127.0.0.1"; 
     } 
} 
+0

谢谢SOOO了!我不知道为什么在文档中他们没有指出。 – Oliver 2012-01-24 20:41:27