Home / Blog / Disable Visual Studio 2022 IIS security attach warning
Disable Visual Studio 2022 IIS security attach warning

Disable Visual Studio 2022 IIS security attach warning

Running Visual Studio as administrator is needed to host your web project in IIS. Everytime the debugger is started the "Attach Security Warning" confirmation dialog appears. Modify the registry to disable this.

 regedit vs2022 securitywarning

 Follow these steps to modify the private registry file (privateregistry.bin):


1. Close Visual Studio 2022. Start regedit.exe and select the node HKEY_USERS

disable iis attach security 1

2. In the File menu choose: Load Hive (in dutch: Bestand -> Component laden) and browse to the user Appdata folder.

disable iis attach security 2


3. Give the new hive a name.

disable iis attach security 3


4. The local registry file is loaded. Go to:

Software\Microsoft\VisualStudio\17.0xxxxx\Debugger\


5. Create a new DWORD key: DisableAttachSecurityWarning and set the value to 1

disable iis attach security 4


6. Finally don't forget to unload the hive and close regedit.

disable iis attach security warning5


Start Visual Studio 2022 (as Administrator) and the security attach warning is gone when running the debugger attached to the IIS webserver.

Contact