Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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

share|improve this question
add comment

3 Answers

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.

share|improve this answer
    
Just what I was going to say. If you are on a dev machine, attach to all w3wp processes that you find. –  SPArchaeologist Nov 22 '12 at 10:24
add comment

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.

share|improve this answer
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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