ComponentSpace

Forums



CryptographicException: Keyset does not exist


CryptographicException: Keyset does not exist

Author
Message
sailcoyote
sailcoyote
New Member
New Member (2 reputation)New Member (2 reputation)New Member (2 reputation)New Member (2 reputation)New Member (2 reputation)New Member (2 reputation)New Member (2 reputation)New Member (2 reputation)New Member (2 reputation)

Group: Forum Members
Posts: 1, Visits: 11
Using the ExampleIdentityProvider with no modifications.

Error String:

Keyset does not exist

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 
Exception Details: System.Security.Cryptography.CryptographicException: Keyset does not exist
Source Error: 
Line 49:     }Line 50: Line 51:     SAMLIdentityProvider.InitiateSSO(Line 52:      Response,Line 53:      userName,

Source File: E:\SAML v2.0 for .NET\Examples\SSO\HighLevelAPI\WebForms\ExampleIdentityProvider\Default.aspx.cs    Line: 51 
Stack Trace: 
[CryptographicException: Keyset does not exist] System.Security.Cryptography.Utils.CreateProvHandle(CspParameters parameters, Boolean randomKeyContainer) +4916488 System.Security.Cryptography.Utils.GetKeyPairHelper(CspAlgorithmType keyType, CspParameters parameters, Boolean randomKeyContainer, Int32 dwKeySize, SafeProvHandle& safeProvHandle, SafeKeyHandle& safeKeyHandle) +69 System.Security.Cryptography.RSACryptoServiceProvider.GetKeyPair() +92 System.Security.Cryptography.RSACryptoServiceProvider..ctor(Int32 dwKeySize, CspParameters parameters, Boolean useDefaultKeySize) +173 System.Security.Cryptography.X509Certificates.X509Certificate2.get_PrivateKey() +195 ComponentSpace.SAML2.Utility.Certificate.GetPrivateKey(X509Certificate2 x509Certificate) in C:\Sandboxes\ComponentSpace\SAMLv20\Library\Utility\Certificate.cs:64 ComponentSpace.SAML2.InternalSAMLIdentityProvider.CreateSAMLResponse(String userName, SAMLAttribute[] attributes, String authnContext, Status status, String assertionConsumerServiceUrl) in C:\Sandboxes\ComponentSpace\SAMLv20\Library\InternalSAMLIdentityProvider.cs:738 ComponentSpace.SAML2.InternalSAMLIdentityProvider.InitiateSSO(HttpResponse httpResponse, String userName, SAMLAttribute[] attributes, String authnContext, String relayState, String partnerSP, String assertionConsumerServiceUrl) in C:\Sandboxes\ComponentSpace\SAMLv20\Library\InternalSAMLIdentityProvider.cs:1234 ExampleIdentityProvider._Default.ssoLinkButton_Click(Object sender, EventArgs e) in E:\SAML v2.0 for .NET\Examples\SSO\HighLevelAPI\WebForms\ExampleIdentityProvider\Default.aspx.cs:51 System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e) +116 System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +106 System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +12 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +15 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +9758702 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1639


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.2558.0

ComponentSpace
ComponentSpace
ComponentSpace Development
ComponentSpace Development (3.9K reputation)ComponentSpace Development (3.9K reputation)ComponentSpace Development (3.9K reputation)ComponentSpace Development (3.9K reputation)ComponentSpace Development (3.9K reputation)ComponentSpace Development (3.9K reputation)ComponentSpace Development (3.9K reputation)ComponentSpace Development (3.9K reputation)ComponentSpace Development (3.9K reputation)

Group: Administrators
Posts: 2.8K, Visits: 8.8K
This is a permissions error accessing the private key for idp.pfx.
Please refer to the following topic.
https://www.componentspace.com/Forums/29/Troubleshooting-Loading-X.509-Certificates


Regards
ComponentSpace Development
GO


Similar Topics


Execution: 0.000. 2 queries. Compression Enabled.
Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....









Forums, Documentation & Knowledge Base - ComponentSpace


Search