Here is yet another command you may not be aware of. But it can be really helpful when you are troubleshooting many types of issues with IIS/ASP.NET.
!clientconns is part of a debugger extension that ships with DebugDiag. In the directory where you installed DebugDiag there will be a subfolder called Exts. Inside there is the extension IISInfo.dll, this extension has this command in it.
Now that we have where to get this extension from out of the way, what does it do? Well, this will walk through all incoming requests in IIS and print them out along with the state they are in. It will also print out how long the request has been running for. This can be very helpful when dealing with a hang situation or heavy load.
So here is one sample output from this command:
Item# 290, UL_NATIVE_REQUEST = AE886E8 Request State: 0 (NREQ_STATE_START) ** Request is complete. ============================= Item# 291, UL_NATIVE_REQUEST = AEA1F98 Request State: 0 (NREQ_STATE_START) ** Request is complete. ============================= Item# 292, UL_NATIVE_REQUEST = AEA3F08 Request State: 2 (NREQ_STATE_PROCESS) Client: IP= 126.96.36.199 / Port= 3571 (0xDF3) Server: IP= 188.8.131.52 / Port= 80 (0x50) [Not SSL/Secure] ----------------------------- POST /184.108.40.206/Customer.asmx HTTP/1.1
Another is like this:
0:000> !clientconns UL_NATIVE_REQUEST listhead at: 0x5a36a064 ==================================== Item# 77, UL_NATIVE_REQUEST = 0x043e86f8 Client IP/Port: 220.127.116.11:2320 Server IP/Port: 18.104.22.168:80 Host Header: blah:80 Request state: NREQ_STATE_PROCESS Requested URL: GET /test.asp HTTP/1.1 Query String: r=1 Starttime (0x606df9ae) Uptime (0x606e50f5) Request active 22343 ms (0 days: 00:00:22.343) Executing in process id 11420
This second one is from an inetinfo process and it shows the request coming in (this is prior to Windows 2003) and as you can see, it gives you the PID of the process serving the request and a lot of other details.
You can use this in conjunction with checking the ASP.NET Queue to see if requests are getting stuck somewhere along the way for example. The command to see that in ASP.NET 2.0 is: