I built a HTTP Module, insert the DLL into the GAC, changed the webConfig Now , if on visual studio , I Attach to process W3WP , Open the web page where the module must work, I notice that breakpoints has warning and they don't hit! There are more than one w3wp.exe process. Which one should I Catch? I don't if I'm attaching to the wrong process. enter image description here


Usually you can discover which one to attach to by the user name. It is usually the same as the application pool identity you're running your SharePoint Web Application with.

It's no problem to attach to all, but for god sakes, do not attach to processes on a production environment, because hitting breakpoint, pauses sharepoint processes.

It is also important to at least recycle the application pool after adding the DLL to Gac.

  • Just what I was going to say. If you are on a dev machine, attach to all w3wp processes that you find.
    – SPArcheon
    Nov 22 '12 at 10:24

To find more information about the w3wp processes to figure out which one to attach to, you can use this command (I have it saved to a batch file).

%windir%\system32\inetsrv\appcmd.exe list wp

I've got one for SecurityTokenService, one with a GUID-ish name that is the search service, and one called "Sharepoint - Port#" for each web app.


The rule of thumb for me was always to pick the worker process with the highest number as ID.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.