views:

703

answers:

5

IIS 7 and Visual Studio 2008, every time you attach to w3wp.exe you get an Attach Security Warning,

How do you turn this of?

It would be cool to know also, how to keep it attached for linger, as this seems to time out after a while

Btw: I Added this as a comment to the answer below, the first thing i did was try the msdn article http://msdn.microsoft.com/en-us/library/ms241736.aspx that doesn't work

+1  A: 

your answer is available at http://msdn.microsoft.com/en-us/library/ms241736.aspx

If you are debugging a legitimate scenario that causes this warning to appear, and want to suppress it, there is a registry setting that allows you to do this. Remember to re-enable the warning after you are done with the scenario.

Tzury Bar Yochay
should have said i tried that but doesnt work
Miau
A: 

According to the comment of "Roundcrisis" added to his own question, the msdn article mentioned in the post of "Tzury Bar Yochay" did work NEITHER at my site (even after restarting VS-2K8). I think I may doubt the fact that the user - Administrator - is marked as an "untrusted user".

So the question remains: how to get rid of this annoying dialog. In addition: how to widen op the time frame of debugging.

+4  A: 

Also found in the article mentioned by Tzury, but to sum up the answers in this thread:

Change the following registry key from - to 1:

Visual Studio 2008 - HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\Debugger\DisableAttachSecurityWarning

update based on 'user227899's comment: make sure VS2008 is not running when changing the registry key

Zidad
+5  A: 

I guys I was able to make it Work on Windows 7. I have first changed the registry value with VS2008 still opened. I then closed it and refreshed the registry editor and noticed that the value was reset to 0. I then changed it back to 1 and started VS2008. It now works fine. I have tried to close VS2008 ans open it back and the registry value stays 1. Thanks for your help

Eric Villemure
A: 

The registry setting does work; however, you have to make sure you set it in the 32-bit registry sandbox for VS2005/2008 by either using the 32-bit regedit.exe in %windir%\SysWOW64\ or adding it under HKLM\Software\Wow6432Node\.... I created a .reg script that simply adds it to both:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\Debugger]
"DisableAttachSecurityWarning"=dword:00000001

[HKEY_CURRENT_USER\Software\Wow6432Node\Microsoft\VisualStudio\9.0\Debugger]
"DisableAttachSecurityWarning"=dword:00000001

Just change the version to 8.0 for 2005, 10.0 for 2010, etc.

NOTE: regedit on Windows 7 seems to want .reg files saved as UTF16-LE, so if you save it to a .reg file, be aware you need to do that.

Chris R. Donnelly