Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to ignore error: System.Security.Cryptography.CryptographicException: Store Root doesn't exists

I'm using Xamarin for creating Monodroid app. My communication with backend is going over https protocol. That leads to "System.Security.Cryptography.CryptographicException: Store Root doesn't exists" error in debug mode which is quate annoying. If I hit "Continue" everything goes well.

I have two questions here: 1. why this error occurs. My backend has valid certificate and https connection could be established from other clients without any issues. 2. How can I ignore this error (actually warning I think) if there is no way to fix that?

Thank you for any suggestion!

like image 851
Alexey Strakh Avatar asked Oct 11 '13 02:10

Alexey Strakh


People also ask

How do I fix the keyset does not exist in Cryptographicexception?

Step 1: Go to folder (C:\Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA). Step 2: Open properties for MachineKeys Folder and go to Security Tab.

What is cryptographic exception?

The exception that is thrown when an error occurs during a cryptographic operation.


2 Answers

From what I've observed, you will only see this exception if you have "break on all errors" turned on in Visual Studio / Xamarin Studio. The exception is thrown and caught by the mono https infrastructure.

like image 40
Paul Batum Avatar answered Sep 22 '22 07:09

Paul Batum


There is a discussion in Xamarin Developer Center with the last post on 16 July 2013 and no rersponse how to fix it.

And the second one also in Xamarin Developer Center. This time TS wrote:

But when it happens (twice ever so far) it happened for multiple calls in a row over a minute or two of debugging - but didn't happen when we restarted the app. So it felt more like something was wrong within the app rather than on server side...

There is also a registered bug in Xamarin Bugzilla with SSL Exception when connection google-based API Title and its not affects iOS.

To summarise:

as for today there is no solution for it, but you can observe the links shown and maybe also post your information under Xamarin Developer Center or Bugzilla.

like image 196
MikroDel Avatar answered Sep 22 '22 07:09

MikroDel