Condividi tramite


Metodo WorkerProcess.GetExecutingRequests2

Ottiene le richieste attualmente assegnate a un processo di lavoro.

Sintassi

objWorkerProcess.GetExecutingRequests(RequestArray);  
objWorkerProcess.GetExecutingRequests RequestArray  

Parametri

Nome Definizione
RequestArray Matrice che contiene oggetti HttpRequest .

Valore restituito

Questo metodo non restituisce valori.

Commenti

Questo metodo accetta una matrice vuota come OUT parametro, che riempie di HttpRequest oggetti .

Esempio

Nell'esempio seguente vengono recuperate informazioni sulle richieste attualmente accodate per ogni processo di lavoro.

' Connect to the WMI WebAdministration namespace.  
Set oWebAdmin = GetObject("winmgmts:root\WebAdministration")  
  
' Get the worker processes.  
Set oW3WPs = oWebAdmin.InstancesOf("WorkerProcess")  
  
For Each oW3WP In oW3WPs  
  
    ' Place the requests queued for a process into an array.  
    oW3WP.GetExecutingRequests arrReqs  
  
    ' Show the number of queued requests.  
    If IsNull(arrReqs) Then  
        WScript.Echo "No currently executing requests."  
    Else  
        ' Display the number of requests.  
        WScript.Echo "Number of currently executing requests: " & _  
            UBound(arrReqs) + 1  
        WScript.Echo  
  
        ' List the properties of each request.  
        For Each oRequest In arrReqs  
            WScript.Echo "Module: " & "[" & oRequest.CurrentModule & "]"  
            WScript.Echo "Verb:" & "[" & oRequest.Verb & "]"  
            WScript.Echo "HostName: " & "[" & oRequest.HostName & "]"  
            WScript.Echo "Url: " & "[" & oRequest.Url & "]"  
            WScript.Echo  
        Next  
    End If  
Next  

Requisiti

Tipo Descrizione
Client - IIS 7.0 in Windows Vista
- IIS 7.5 in Windows 7
- IIS 8.0 in Windows 8
- IIS 10.0 in Windows 10
Server - IIS 7.0 in Windows Server 2008
- IIS 7.5 in Windows Server 2008 R2
- IIS 8.0 in Windows Server 2012
- IIS 8.5 in Windows Server 2012 R2
- IIS 10.0 in Windows Server 2016
Prodotto - IIS 7.0, IIS 7.5, IIS 8.0, IIS 8.5, IIS 10.0
File MOF WebAdministration.mof

Vedere anche

Classe HttpRequest
Visualizzare le richieste attualmente in esecuzione in un processo di lavoro
Classe WorkerProcess