Jump to content
Welcome to our new Citrix community!
  • 0

XenCenter: System.Security.Cryptography.CryptographicException: Key not valid for use in specified state.


Peter VARGA1709157052

Question

Hi,

 

Each time I start XenCenter [from 7.6 to 8.1] on my laptop I get the below error and all saved server credentials are lost. I have to enter them each time. Below also the content from the log file.

Any idea how I can get rid of it? I uninstalled XC 7.6 and installed 8.1 but the error remained.

 

Thx


 

2020-02-13 13:17:31,460 INFO  XenAdmin.Program [Main program thread] - Application started
2020-02-13 13:17:31,478 INFO  XenAdmin.Program [Main program thread] - Version: 8.1.1.7256
2020-02-13 13:17:31,483 INFO  XenAdmin.Program [Main program thread] - .NET runtime version: 4.0.30319.42000
2020-02-13 13:17:31,483 INFO  XenAdmin.Program [Main program thread] - OS version: Microsoft Windows NT 10.0.18362.0
2020-02-13 13:17:31,483 INFO  XenAdmin.Program [Main program thread] - UI Culture: English (United States)
2020-02-13 13:17:31,483 INFO  XenAdmin.Program [Main program thread] - Bitness: 64-bit
2020-02-13 13:17:31,487 INFO  XenAdmin.Dialogs.OptionsDialog [Main program thread] - Tools Options Settings -
2020-02-13 13:17:31,488 INFO  XenAdmin.Dialogs.OptionsPages.ConnectionOptionsPage [Main program thread] - Connection Tab Settings -
2020-02-13 13:17:31,488 INFO  XenAdmin.Dialogs.OptionsPages.ConnectionOptionsPage [Main program thread] - === ProxySetting: 0
2020-02-13 13:17:31,489 INFO  XenAdmin.Dialogs.OptionsPages.ConnectionOptionsPage [Main program thread] - === ProxyAddress: 
2020-02-13 13:17:31,489 INFO  XenAdmin.Dialogs.OptionsPages.ConnectionOptionsPage [Main program thread] - === ProxyPort: 80
2020-02-13 13:17:31,489 INFO  XenAdmin.Dialogs.OptionsPages.ConnectionOptionsPage [Main program thread] - === ByPassProxyForServers: False
2020-02-13 13:17:31,489 INFO  XenAdmin.Dialogs.OptionsPages.ConnectionOptionsPage [Main program thread] - === ProvideProxyAuthentication: False
2020-02-13 13:17:31,489 INFO  XenAdmin.Dialogs.OptionsPages.ConnectionOptionsPage [Main program thread] - === ProxyAuthenticationMethod: 1
2020-02-13 13:17:31,489 INFO  XenAdmin.Dialogs.OptionsPages.ConnectionOptionsPage [Main program thread] - === ConnectionTimeout: 20000
2020-02-13 13:17:31,492 INFO  XenAdmin.Dialogs.OptionsPages.ConsolesOptionsPage [Main program thread] - Console Tab Settings -
2020-02-13 13:17:31,492 INFO  XenAdmin.Dialogs.OptionsPages.ConsolesOptionsPage [Main program thread] - === FullScreenShortcutKey: 3
2020-02-13 13:17:31,493 INFO  XenAdmin.Dialogs.OptionsPages.ConsolesOptionsPage [Main program thread] - === DockShortcutKey: 1
2020-02-13 13:17:31,493 INFO  XenAdmin.Dialogs.OptionsPages.ConsolesOptionsPage [Main program thread] - === UncaptureShortcutKey: 0
2020-02-13 13:17:31,493 INFO  XenAdmin.Dialogs.OptionsPages.ConsolesOptionsPage [Main program thread] - === ClipboardAndPrinterRedirection: True
2020-02-13 13:17:31,493 INFO  XenAdmin.Dialogs.OptionsPages.ConsolesOptionsPage [Main program thread] - === WindowsShortcuts: True
2020-02-13 13:17:31,493 INFO  XenAdmin.Dialogs.OptionsPages.ConsolesOptionsPage [Main program thread] - === ReceiveSoundFromRDP: True
2020-02-13 13:17:31,493 INFO  XenAdmin.Dialogs.OptionsPages.ConsolesOptionsPage [Main program thread] - === AutoSwitchToRDP: True
2020-02-13 13:17:31,494 INFO  XenAdmin.Dialogs.OptionsPages.ConsolesOptionsPage [Main program thread] - === ConnectToServerConsole: True
2020-02-13 13:17:31,494 INFO  XenAdmin.Dialogs.OptionsPages.ConsolesOptionsPage [Main program thread] - === PreserveScaleWhenUndocked: True
2020-02-13 13:17:31,494 INFO  XenAdmin.Dialogs.OptionsPages.ConsolesOptionsPage [Main program thread] - === PreserveScaleWhenSwitchBackToVNC: True
2020-02-13 13:17:31,495 INFO  XenAdmin.Dialogs.OptionsPages.SecurityOptionsPage [Main program thread] - === WarnUnrecognizedCertificate: False
2020-02-13 13:17:31,495 INFO  XenAdmin.Dialogs.OptionsPages.SecurityOptionsPage [Main program thread] - === WarnChangedCertificate: False
2020-02-13 13:17:31,496 INFO  XenAdmin.Dialogs.OptionsPages.UpdatesOptionsPage [Main program thread] - === AllowXenCenterUpdates: True
2020-02-13 13:17:31,496 INFO  XenAdmin.Dialogs.OptionsPages.UpdatesOptionsPage [Main program thread] - === AllowPatchesUpdates: True
2020-02-13 13:17:31,497 INFO  XenAdmin.Dialogs.OptionsPages.UpdatesOptionsPage [Main program thread] - === AllowXenServerUpdates: True
2020-02-13 13:17:31,497 INFO  XenAdmin.Dialogs.OptionsPages.DisplayOptionsPage [Main program thread] - === FillAreaUnderGraphs: False
2020-02-13 13:17:31,497 INFO  XenAdmin.Dialogs.OptionsPages.DisplayOptionsPage [Main program thread] - === RememberLastSelectedTab: True
2020-02-13 13:17:31,498 INFO  XenAdmin.Dialogs.OptionsPages.SaveAndRestoreOptionsPage [Main program thread] - === SaveSession: True
2020-02-13 13:17:31,498 INFO  XenAdmin.Dialogs.OptionsPages.SaveAndRestoreOptionsPage [Main program thread] - === RequirePass: False
2020-02-13 13:17:31,511 INFO  XenAdmin.Dialogs.OptionsPages.PluginOptionsPage [Main program thread] - === DisabledPlugins: <None>
2020-02-13 13:17:31,512 INFO  XenAdmin.Dialogs.OptionsPages.ConfirmationOptionsPage [Main program thread] - === DoNotConfirmDismissAlerts: False
2020-02-13 13:17:31,512 INFO  XenAdmin.Dialogs.OptionsPages.ConfirmationOptionsPage [Main program thread] - === DoNotConfirmDismissUpdates: False
2020-02-13 13:17:31,512 INFO  XenAdmin.Dialogs.OptionsPages.ConfirmationOptionsPage [Main program thread] - === DoNotConfirmDismissEvents: False
2020-02-13 13:17:31,514 WARN  XenAdmin.Program [Main program thread] - Too few args passed in via command line
2020-02-13 13:17:31,521 INFO  XenAdmin.Program [Main program thread] - Connecting to pipe '\\.\pipe\XenCenter-6-Besitzer-C:-Program Files (x86)-Citrix-XenCenter-XenCenterMain.exe'
2020-02-13 13:17:31,523 INFO  XenAdmin.Program [Main program thread] - Successfully created pipe '\\.\pipe\XenCenter-6-Besitzer-C:-Program Files (x86)-Citrix-XenCenter-XenCenterMain.exe' - proceeding to launch XenCenter
2020-02-13 13:17:34,480 INFO  XenAdmin.Plugins.PluginManager [Main program thread] - Plugin directory C:\Program Files (x86)\Citrix\XenCenter\Plugins was not found.
2020-02-13 13:17:35,498 FATAL XenAdmin.Program [Main program thread] - Uncaught exception
System.Security.Cryptography.CryptographicException: Key not valid for use in specified state.

   at System.Security.Cryptography.ProtectedData.Unprotect(Byte[] encryptedData, Byte[] optionalEntropy, DataProtectionScope scope)
   at XenCenterLib.EncryptionUtils.Unprotect(String protectedstring)
   at XenAdmin.Core.HealthCheck.SendProxySettingsToHealthCheck()
   at XenAdmin.MainWindow.MainWindow_Shown(Object sender, EventArgs e)
   at System.Windows.Forms.Form.OnShown(EventArgs e)
   at XenAdmin.MainWindow.OnShown(EventArgs e)
   at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
   at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
2020-02-13 13:17:35,504 INFO  XenAdmin.Program [Main program thread] - Version: 8.1.1.7256
2020-02-13 13:17:35,504 INFO  XenAdmin.Program [Main program thread] - .NET runtime version: 4.0.30319.42000
2020-02-13 13:17:35,504 INFO  XenAdmin.Program [Main program thread] - OS version: Microsoft Windows NT 10.0.18362.0
2020-02-13 13:17:35,504 INFO  XenAdmin.Program [Main program thread] - UI Culture: English (United States)
2020-02-13 13:17:35,504 INFO  XenAdmin.Program [Main program thread] - Bitness: 64-bit
2020-02-13 13:17:35,506 INFO  XenAdmin.Program [Main program thread] - Log Application State
2020-02-13 13:17:35,506 INFO  XenAdmin.Program [Main program thread] - ExitCode: 0
2020-02-13 13:17:35,507 INFO  XenAdmin.Program [Main program thread] - Time since process started: 00:00:04.7189718
2020-02-13 13:17:35,510 INFO  XenAdmin.Program [Main program thread] - Handles open: 869
2020-02-13 13:17:35,510 INFO  XenAdmin.Program [Main program thread] - USER handles open: 158
2020-02-13 13:17:35,510 INFO  XenAdmin.Program [Main program thread] - GDI handles open: 82
2020-02-13 13:17:35,510 INFO  XenAdmin.Program [Main program thread] - Thread count: 27
2020-02-13 13:17:35,512 INFO  XenAdmin.Program [Main program thread] - Virtual memory size: 39553937408 B(36.8 GB)
2020-02-13 13:17:35,512 INFO  XenAdmin.Program [Main program thread] - Working set: 113442816 B(108 MB)
2020-02-13 13:17:35,512 INFO  XenAdmin.Program [Main program thread] - Private memory size: 68456448 B(65 MB)
2020-02-13 13:17:35,512 INFO  XenAdmin.Program [Main program thread] - Nonpaged system memory size: 64136 B(63 kB)
2020-02-13 13:17:35,512 INFO  XenAdmin.Program [Main program thread] - Paged memory size: 68456448 B(65 MB)
2020-02-13 13:17:35,512 INFO  XenAdmin.Program [Main program thread] - Paged system memory size: 705960 B(689 kB)
2020-02-13 13:17:35,512 INFO  XenAdmin.Program [Main program thread] - Peak paged memory size: 69607424 B(66 MB)
2020-02-13 13:17:35,512 INFO  XenAdmin.Program [Main program thread] - Peak virtual memory size: 39554527232 B(36.8 GB)
2020-02-13 13:17:35,512 INFO  XenAdmin.Program [Main program thread] - Peak working set: 113954816 B(109 MB)
2020-02-13 13:17:35,513 INFO  XenAdmin.Program [Main program thread] - Process priority class: Normal
2020-02-13 13:17:35,513 INFO  XenAdmin.Program [Main program thread] - Privileged processor time: 00:00:00.8437500
2020-02-13 13:17:35,513 INFO  XenAdmin.Program [Main program thread] - Total processor time: 00:00:04.4062500
2020-02-13 13:17:35,513 INFO  XenAdmin.Program [Main program thread] - User processor time: 00:00:03.5625000

 

image.thumb.png.e04c424c34509ab58ce7dd34bf4063a0.png

Link to comment

9 answers to this question

Recommended Posts

  • 3

Today, I said "enough  is enough" so I asked Google and then I got several answers. One was this thread which put me in the right direction:

 

I started to play with the user.config file and the only one solution was that I deleted completely the %APPDATA%\Citrix\XenCenterMain.exe_Url_e3jqcmyhhuvw2c1t3wydiid0qz3e5jr3 directory [deleting user.config or the parent directory didn't work as XenCenter apparently restores it somehow from any copy it finds in the directory tree].

 

Now, finally XenCenter starts without this annoying error message.

 

PS: I could then also copy the directories for the old XenCenter versions back and it still works. I know, they aren't needed anymore but I wanted to see if now really the most current directory is accessed/parsed.

  • Like 4
Link to comment
  • 0
21 minutes ago, Alan Lantz said:

If that happens on multiple clients I would rebuild the certificate.

 

https://support.citrix.com/article/CTX214365

 

--Alan--

 

 

No, it happens only on my laptop. The other XC sessions on other computers are OK. Still sure I should rebuild the certificate?

The error message mentioned in the article doesn't appear at all in the log.

 

Thx

Link to comment
  • 0

I was going by that cryptographic key error in the logs. Is your Laptop Windows 10 ? 

I don't have XenCenter on Windows 7 anymore, wondering if an update may have

broken it?  I don't think I would rebuild the certificate if other workstations work and

its isolated to the one laptop.

 

 

--Alan--

 

 

Link to comment
  • 0
19 hours ago, Alan Lantz said:

I was going by that cryptographic key error in the logs. Is your Laptop Windows 10 ? 

I don't have XenCenter on Windows 7 anymore, wondering if an update may have

broken it?  I don't think I would rebuild the certificate if other workstations work and

its isolated to the one laptop.

 

 

--Alan--

 

 

 

Yes, the laptop has Windows 10. The other PCs have Windows 10 as well or even Windows Server 2012 R2 and there doesn't exist this XC issue. What can it be? Should I delete something, remove registry entries or whatever? Thx

Link to comment
  • 0
19 minutes ago, Alan Lantz said:

I think its something with the Windows 10 build. You could try updating it to the latest

release if you aren't there already. Something else to try would be an sfc scan and also

try moving the %appdata%\roaming\microsoft\crypto\rsa folder and let windows 

rebuild it.

 

--Alan--

 

 


Yes, it is the latest build. I tried sfc and moving of the rsa folder, I removed also the servers from XC and introduced again the credentials --> nothing helped.

As I know the Citrix support, they have no interest to fix this bug as long I don't pay them to fix their bug.

 

Thank you anyway for your help!

Link to comment
  • 0
On 10/4/2020 at 5:42 AM, Peter VARGA1709157052 said:

Today, I said "enough  is enough" so I asked Google and then I got several answers. One was this thread which put me in the right direction:

 

I started to play with the user.config file and the only one solution was that I deleted completely the %APPDATA%\Citrix\XenCenterMain.exe_Url_e3jqcmyhhuvw2c1t3wydiid0qz3e5jr3 directory [deleting user.config or the parent directory didn't work as XenCenter apparently restores it somehow from any copy it finds in the directory tree].

 

Now, finally XenCenter starts without this annoying error message.

 

PS: I could then also copy the directories for the old XenCenter versions back and it still works. I know, they aren't needed anymore but I wanted to see if now really the most current directory is accessed/parsed.

 

This worked for me also, exact same issue.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...