Weird RDP Problem on Vista

So since I am a field based worker here at Microsoft I rely heavily on RDP to access all sorts of things back in the office.  It is an awesome tool that enables me to get a ton done without being in a physical office.  That said on last Friday it broke on my laptop.  I have no idea how it happened but something was horribly wrong.  I tired to connect to a variety of machines and I was getting one of 2 errors:

[Window Title]
Remote Desktop Disconnected

[Content]
The remote session was disconnected because the local computer's client access license could not be upgraded or renewed.
Please contact the server administrator.

[OK] [Help]

or

[Window Title]
Remote Desktop Disconnected

[Content]
The remote session was disconnected because there was an internal error in the remote computer's licensing protocol.

[OK] [Help]

This was really wired.  I doubted that this was a problem with the remote computers since it happened on my machine whenever I connected to any remote machine.  I tried all sorts of stuff.  I used the slbmgr script to make sure my Vista license was up to date and it was so that is good.

I poked around all over the place and found no mention of a problem like this.  Typically these error messages did indeed indicate a problem with the server that people were trying to connect to.  However in those cases almost everyone connecting to the server experienced the problem.  In my case these are heavily used machines that I was trying to connect to so it would be a big deal if no one could connect so I ruled that out.

After searching around a bit it turned out that there is registry where the Terminal Server/Remote Desktop Licensing is stored:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSLicensing\Store

This is mentioned in several KB articles:

The first article seems most related to my problem in hindsight but it was targeted at XP.  So from these I took away a couple of things:

  1. RDP/TS client side license information is cached in the MSLicensing registry and its sub keys
  2. You need to be an Admin to edit this stuff.

Since I was running out of ideas I figure why not give it a shot.  So I did the following:

  1. Open up REGEDIT
  2. Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSLicensing\Store
  3. Right click on the MSLicensing Key and Export it just incase things go wrong you can import it back in.
  4. Delete the Store Key
  5. Go to the Start Menu and went to All Programs -> Accessories -> Remote Desktop Connection and Right Clicked on it and select "Run As Administrator".
  6. Connected to a machine.

After connecting to a machine the Store key was recreated and then I could connect as normal to RDP machines again.  After this first run as an administrator I no longer needed to run as Admin for my RDP sessions. 

NOTE - I tried deleting the key and just reconnecting as a non-admin and I was still getting errors and I presume this was because it could not recreate the needed keys.

It looks like some how the value in this registry key got corrupted.  I am not really sure how at this point but I am going to look into that a bit more.    When looking at these steps please keep a few things in mind:

  1. Ensure this is a client side problem.  If you only have trouble connecting to one machine it is probably not a client side issue.

  2. Do not do this if you do not know how to edit the registry and back thing up.  Here is the warning that they add in KB articles:

    Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:

    322756 (https://support.microsoft.com/kb/322756/) How to back up and restore the registry in Windows

  3. As always this stuff is based on my experience and I just rely to provide some additional information and I cannot guarantee that it will resolve you problem but hopefully the information will help.

Have a great day!