• Sign In
 
  • MSDN Blogs
  • Microsoft Blog Images
  • More ...
Common Tasks
  • Blog Home
  • Email Blog Author
  • RSS for comments
  • RSS for posts
Search
  • Advanced search options...
Tags
  • .NET Framewor
  • .NET Framework
  • Ajax/Javascript
  • ASP.NET
  • CLR
  • Cool stuff
  • DataAccess
  • Debugging/Windbg
  • Hotfix/Service Pack
  • IDEVDataCollector
  • IIS
  • Internet Explorer
  • Italian techs
  • LogParser
  • OT
  • Personal
  • Productivity
  • Random
  • Scripting/ASP
  • Security
  • Technology
  • Tools
  • Troubleshooting
  • Vista/Longhorn
  • Visual Studio
Archives
Archives
  • November 2010 (1)
  • October 2010 (1)
  • July 2010 (2)
  • April 2010 (1)
  • March 2010 (2)
  • February 2010 (2)
  • January 2010 (1)
  • October 2009 (2)
  • September 2009 (2)
  • August 2009 (1)
  • July 2009 (5)
  • June 2009 (1)
  • May 2009 (1)
  • April 2009 (3)
  • March 2009 (3)
  • February 2009 (5)
  • January 2009 (3)
  • December 2008 (5)
  • November 2008 (3)
  • October 2008 (2)
  • September 2008 (3)
  • August 2008 (3)
  • July 2008 (3)
  • June 2008 (5)
  • May 2008 (4)
  • April 2008 (8)
  • March 2008 (4)
  • February 2008 (5)
  • January 2008 (2)
  • December 2007 (4)
  • November 2007 (6)
  • October 2007 (6)
  • September 2007 (8)
  • August 2007 (6)
  • July 2007 (7)
  • June 2007 (10)
  • May 2007 (9)
  • April 2007 (12)
  • March 2007 (8)
  • February 2007 (5)
  • January 2007 (3)
  • December 2006 (1)
  • November 2006 (4)
  • October 2006 (2)
  • September 2006 (9)
  • August 2006 (2)
  • July 2006 (1)

Find which w3wp.exe instance is hosting your application

MSDN Blogs > Never doubt thy debugger > Find which w3wp.exe instance is hosting your application

Find which w3wp.exe instance is hosting your application

Carlo Cardella
13 Apr 2007 5:38 PM
  • Comments 1

Just a quick and easy one for this Friday evening: let's say you have multiple w3wp.exe instances running on your web server (maybe you have multiple application pools, or you enabled Web Garden etc...), one of the ASP.NET applications you have on that server has some problems and you need to capture a memory dump to troubleshoot it: what can you do?

Easy one: install the Debugging Tools for Windows and run adplus with something like the following:

cscript adplus.vbs -hang -pn w3wp.exe

But, hey, you don't want to end up with a full dump for every w3wp.exe loaded in memory, you just need one of them, the one which is hosting your application... smile_eyeroll

Well... here is where iisapp.vbs comes to the rescue! smile_regular You can find it under C:\Windows\System32 folder on your Windows 2003 machine, and if you simply run it at the command line, it'll print to the console the PID of all w3wp.exe processes running and the Application Pool ID that particular process is hosting; here is a screenshot I just took in my machine:

iisapp.vbs output

Since you are supposed to know under which application pool your application is running (and if you don't know you can check it through the IIS Management Console) you are ready to go! Let's say I want to dump an application running under "Live" App Pool:

cscript adplus.vbs -hang -p 4612

Here we go; not comes the tricky (and funny) part: analyze the dump smile_nerd

 

Cheers

  • 1 Comments
IIS, Debugging/Windbg
Leave a Comment
  • Please add 8 and 5 and type the answer here:
  • Post
Comments
  • Interesting finding - 04/17/2007 « Another .NET Blog
    17 Apr 2007 6:43 PM

    PingBack from http://liangwu.wordpress.com/2007/04/17/interesting-finding-04172007/

Page 1 of 1 (1 items)
  • © 2012 Microsoft Corporation.
  • Terms of Use
  • Trademarks
  • Privacy Statement
  • Report Abuse
  • 5.6.402.223