Attach Debugger Security Warning

Damir Dobric Posts

Next talks:

 

Damir@Phone    

Follow me on Twitter: #ddobric



 

 

Archives

While debugging you WCF-Service or ASP.NET application within UnitTest you may get following warning when stepping into the service code.

“Attaching to this process can potentially harm your computer…”

For example, this can happen when you have the UnitTest which invokes the Service via generate Proxy instance. When you start the UnitTest method in debugger the Visual Studio will attach VsTest.exe process. However, if you want to step into the service code (by pressing “F11”) the Visual Studio will first have to attach to the process which hosts the service. This might be Cassini or IIS. At this moment you may get following warning:

image

If you have been doing this for a while you might be surprised that this message sometimes appears and sometimes not. If you have this feeling you are right.
This message will appear if the attaching process which hosts the service is hosted by user which has no debugging permissions. Mostly this just mean it is not the local admin. More precisely, if the host is a process started by IIS (w3wp.exe) the host identity is defined by identity of the pool of the web application which hosts the service.

 

So, if the pool’s identity has no permission for debugging the message shown above will be popped up. Please be also aware that when working in team you will sometimes be forced to create (next picture) the local directory. In this case IIS will automatically setup the application to default pool, which by default (NETWORK_SERVICE) has no debugging permission.

image


Posted Nov 13 2009, 06:12 PM by Damir Dobric

Comments

Mutma wrote re: Attach Debugger Security Warning
on 12-06-2013 18:10

I drop a leave a response wnheever I appreciate a post on a website or I have something to valuable to contribute to the discussion. It's caused by the fire communicated in the post I looked at. And on this article MCTS 70-503 TS: Microsoft .NET Framework 3.5   Windows Communication Foundation | Inicya e-learning. I was actually moved enough to drop a thought   I actually do have a few questions for you if you tend not to mind. Could it be just me or do a few of the comments appear as if they are left by brain dead visitors?   And, if you are posting at additional online sites, I would like to keep up with anything fresh you have to post. Would you make a list all of your community pages like your Facebook page, twitter feed, or linkedin profile?

developers.de is a .Net Community Blog powered by daenet GmbH.