Thursday, June 14, 2012

Managing Private Key Access for Certificates in Windows Server 2003

Managing Private Key Access for Certificates in Windows Server 2003

Problem:

The Certificates Snap-in for the Microsoft Management Console in Windows Server 2003 does not allow you to "Manage Private Keys...", which makes it impossible to grant user accounts access to a certificate's private key using the Certificates Snap-in.

Solution:

The only option to assign the necessary permissions is the WinHttpCertCfg.exe console application that is part of the  Windows Server 2003 Resource Kit Tools.

  1. Open a command prompt to the location where you have installed the Windows Server 2003 Resource Kit Tools.
  2.  We are going to use the winhttpcertcfg.exe utility to view the accounts that already have access to the certificate's private key, and also to grant permissions to additional accounts.
  3. To view the list of accounts that have access to the certificate's private key, use the following syntax:
    • winhttpcertcfg -l -c [Certificate Store Name] -s [The Name of the Certificate] 
    • Example: winhttpcertcfg -l -c LOCAL_MACHINE\My -s "Named Server Certificate"
  4. To grant an additional account access to the certificate's private key, use the following syntax:
    • winhttpcertcfg -g  -c [Certificate Store Name] -s [The Name of the Certificate] -a [UserName]
    • Example: winhttpcertcfg -g -c LOCAL_MACHINE\My -s "Named Server Certificate" -a ADDomain\ADUserName
  5. After granting the permissions that are required, you can immediately re-issue the command to list the accounts that have access. The result should now contain the account(s) you added in step 4.

References:

Windows Server 2003 Resource Kit Tools
WinHttpCertCfg.exe, A Certificate Configuration Tool

Friday, May 18, 2012

Visual Studio 2010 Hangs on Load

Visual Studio 2010 Hangs on Load


Problem: 

When loading Visual Studio 2010, the user interface freezes displaying "Loading toolbox content from package" followed by a component name and a GUID as picutred below...



Solution:

  1. Exit Visual Studio
  2. Navigate to the affected user's profile folder, i.e. c:\Users\[UserName]
  3. Beneath the user's profile folder, you should find \AppData\Local\Microsoft\VisualStudio\10.0
  4. Locate the file toolbox.tbd and rename it to toolbox.old.
  5. Run Visual Studio, after a few minutes the UI will became responsive which indicates that it completed rebuilding the toolbox.tbd file, which should now be smaller.

 References:

 Similar Microsoft Connect Bug and Workaround