“Unable to attach to the process. Access is denied.”

17Jun09

Have you ever gotten this error while debugging a VS workflow by way of attach to process?

Unabletoattachtoprocess

I get it whenever I debug my workflow! Let me explain. After making changes to my workflow code, I want to see what they do, so I build the solution, upgrade via the WSPBuilder context menu (available by right clicking the project), then Attach to Process, select w3wp.exe (attached to Workflow code) and bam it works.

After I stop the debug and for some reason I want to debug again (having made no changes to code, no rebuild, etc), I Attach to Process and get the above message! Whaaat???

SOLUTION (or what works for me):

Simply Copy to GAC from the WSPBuilder context menu, then Attach to Process and it should work!

CopytoGAC

Again, I am using WSPBuilder so the solution to this problem may be different if you aren’t using it.



3 Responses to ““Unable to attach to the process. Access is denied.””

  1. This doesn’t always work. I’ve had the same issues with WSPBuilder. I’m trying to figure out why sometimes VS can attach to the process and other times it can’t. I’ve tried recycling the app pools, redeploying, etc. But no luck.

    Dennis

  2. You can also do a IISRESET to remove this error.

  3. Resetting iis and restarting vs was a huge pain for me. What ended up working for me was in the attach to process modal when I chose w3wp.exe from the list of available processes, was to go back to select next to attach too and choose managed code. It seemed to stay managed code and it all works fine. It was set to workflow before.
    Your millage may vary.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.