ComponentSpace

Forums



Asp .net Core 3.1 example not working on windows 10


Asp .net Core 3.1 example not working on windows 10

Author
Message
prax14
prax14
New Member
New Member (3 reputation)New Member (3 reputation)New Member (3 reputation)New Member (3 reputation)New Member (3 reputation)New Member (3 reputation)New Member (3 reputation)New Member (3 reputation)New Member (3 reputation)

Group: Forum Members
Posts: 2, Visits: 13
I could not get the .net core 3.1 Example  working on windows 10 laptop. Both IDP and SP failed on reading the private key file. I even tried and regenerated the files and still could not get this working.

An unhandled exception occurred while processing the request.
WindowsCryptographicException: Access denied.
Internal.Cryptography.Pal.CertificatePal.FilterPFXStore(byte[] rawData, SafePasswordHandle password, PfxCertStoreFlags pfxCertStoreFlags)
SamlCertificateException: The X.509 certificate could not be loaded from the file d:\temp\SAMLv20.Core-evaluation\SAML for .NET Core\Examples\NET-Core-3.1\SSO\ExampleServiceProvider\certificates/sp.pfx.
ComponentSpace.Saml2.Certificates.CertificateLoader.LoadCertificateFromFileAsync(string certificateFile, string certificatePassword)


An unhandled exception occurred while processing the request.
WindowsCryptographicException: Access denied.
Internal.Cryptography.Pal.CertificatePal.FilterPFXStore(byte[] rawData, SafePasswordHandle password, PfxCertStoreFlags pfxCertStoreFlags)
SamlCertificateException: The X.509 certificate could not be loaded from the file d:\temp\SAMLv20.Core-evaluation\SAML for .NET Core\Examples\NET-Core-3.1\SSO\ExampleIdentityProvider\certificates/idp.pfx.
ComponentSpace.Saml2.Certificates.CertificateLoader.LoadCertificateFromFileAsync(string certificateFile, string certificatePassword)


Regards,
Prakash

ComponentSpace
ComponentSpace
ComponentSpace Development
ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)

Group: Administrators
Posts: 3.2K, Visits: 11K
Hi Prakash,

Normally there aren't permission errors accessing the certificate files. You'll need to ensure you have permission to access both the PFX files and the private key containers. For more information, please refer to:

https://www.componentspace.com/Forums/29/Troubleshooting-Loading-X509-Certificates


Regards
ComponentSpace Development
prax14
prax14
New Member
New Member (3 reputation)New Member (3 reputation)New Member (3 reputation)New Member (3 reputation)New Member (3 reputation)New Member (3 reputation)New Member (3 reputation)New Member (3 reputation)New Member (3 reputation)

Group: Forum Members
Posts: 2, Visits: 13
ComponentSpace - 8/5/2020
Hi Prakash,

Normally there aren't permission errors accessing the certificate files. You'll need to ensure you have permission to access both the PFX files and the private key containers. For more information, please refer to:

https://www.componentspace.com/Forums/29/Troubleshooting-Loading-X509-Certificates

Running Visual studio as administrator solved this issue.

Thanks for your help.

ComponentSpace
ComponentSpace
ComponentSpace Development
ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)

Group: Administrators
Posts: 3.2K, Visits: 11K
Thanks for the update. I'm not sure why that was required but I'm pleased you got it working. The alternative would have been to set the permissions.

Regards
ComponentSpace Development
GO


Similar Topics


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


Password:


Select a Forum....












Forums, Documentation & Knowledge Base - ComponentSpace


Search