1

これを IIS フォーラムに投稿しましたが、返信がありません。だからここで頑張ろうと思いました。

以前は WCAT 5.2 を使用していましたが、問題なく動作しました。クライアントとサーバーの両方、および IIS 7 をローカル マシンで実行しようとしています。なんらかの理由で、リクエストするすべての URL のステータスが常に 400 (不正なリクエスト) です。

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

設定.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";
        }
    }
}
4

1 に答える 1

6

一部のヘッダー情報が欠落しているため、サーバーは 400 Bad リクエストを返します。リクエスト要素に「ホスト」を追加する必要があります。

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

        setHeader
        {
            name = "Host";
            value = "127.0.0.1";
        }
}
于 2010-10-11T00:29:36.793 に答える