Microsoft .NET Framework:
Unhandled exception has occured in a component in your application. If you click continue, the application will ignore this error and attempt to continue.
Key not valid for use in specified state
Buttons: Details and Continue.
After this error, every time I login to SSMS, it prompts me this message box, If I hit continue it will allow me to login to the server but not to register any new server or see any existing server
I searched online in lot of blogs but did not get the accurate solutions.
You can try the below steps to resolve this issue
1. Copy this on your windows explorer: %APPDATA%\Microsoft\Microsoft SQL Server\100\Tools\Shell\ this will prompt you to the directory:C:\Users\User_Name\AppData\Roaming\Microsoft\Microsoft SQL Server\100\Tools\Shell
2. Delete “windows.prf” & “windowsidx.prf”
3. Move the old “regsrvr.xml” file
4. Try to login to SSMS
5. You won’t see this error and also, you can try to registered the servers from scratch