Thứ Tư, 21 tháng 9, 2016

Turn off Visual Studio Attach security warning when debugging IIS

When using Visual Studio 2008 or 2010, every time you attach to IIS w3wp.exe you get an Attach Security Warning,

How do you turn this off?

Make sure Visual Studio is not running when changing the registry key or it will be overwritten on exit with the old value

Change (or create) the following registry key to 1:

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

Visual Studio 2010 HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\Debugger\DisableAttachSecurityWarning

Visual Studio 2012 HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0\Debugger\DisableAttachSecurityWarning

Visual Studio 2013 HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\Debugger\DisableAttachSecurityWarning

Visual Studio 2015 HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0\Debugger\DisableAttachSecurityWarning

For VS2015, you need to create the Registry Key referenced above.

Make sure Visual Studio is not running, and open the Registry Editor.
Navigate to HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0\Debugger, right-click and create a new DWORD:

  • Name: DisableAttachSecurityWarning
  • Value: 1
Read More

Chủ Nhật, 11 tháng 9, 2016

Windows Server: How to get the list of shutdown event

To get a list of shutdown event with date and time, we can take use of Event Viewer to filter Event ID: 41,1074,1076,6006 in System Event log

1. Open Event Viewer with Eventvwr.exe
2. Navigate to Windows Logs\System
3. Right-Click on it and select "Filter Current Log…"
4. Filter: Event log: System Event ID: 41,1074,1076,6006
5. When you filter them, you can track down its shutdown type, date and time, and who has shutdown it.

We can create custom view for quickly get a list as below:



Read More