Alan_Mc
asked on
Error when creating X509Certificate
Hi,
I'm trying to create an X509 object for an SSL Client Certificate I'm using to POST something, and I get this error..
"Server Error in '/MyWeb' Application.
Access is denied.
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.Cryptograp hy.Cryptog raphicExce ption: Access is denied."
The source code error appears in the line:
Dim clientCert As X509Certificate = X509Certificate.CreateFrom CertFile(( Server.Map Path("File s/myCert.c er")))
The web is hosted on the localhost (so when I debug I go to https://localhost/myweb"), and I have admin privileges.. As far as I know, the certificate is installed in the mmc, and if I open the console I can see it under "Certificates(Local Computer)->Personal->Certi ficates".
Can someone please help?
Many thanks
I'm trying to create an X509 object for an SSL Client Certificate I'm using to POST something, and I get this error..
"Server Error in '/MyWeb' Application.
Access is denied.
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.Cryptograp
The source code error appears in the line:
Dim clientCert As X509Certificate = X509Certificate.CreateFrom
The web is hosted on the localhost (so when I debug I go to https://localhost/myweb"), and I have admin privileges.. As far as I know, the certificate is installed in the mmc, and if I open the console I can see it under "Certificates(Local Computer)->Personal->Certi
Can someone please help?
Many thanks
ASKER
Hi Paranormastic.. What do you mean where am I trying to install it?
What I did from my computer was going to the mmc (windows XP machine) and install it there (what I explained in the first post). That is in my computer, in my windows operating system, so I guess the answer to your question is "to the hard drive"? I am not 100% sure tho, since I don't understand exactly what you mean.
Could you please be more specific as to what you mean with "you have permissions on the cert template"? As well as any other idea you might have on the issue pelase..
Many thanks!
What I did from my computer was going to the mmc (windows XP machine) and install it there (what I explained in the first post). That is in my computer, in my windows operating system, so I guess the answer to your question is "to the hard drive"? I am not 100% sure tho, since I don't understand exactly what you mean.
Could you please be more specific as to what you mean with "you have permissions on the cert template"? As well as any other idea you might have on the issue pelase..
Many thanks!
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
(note on last comment - 'issues on the server' can related to your workstation if that is where the code is running from)
You can also make sure that you have permissions on the cert template, regardless of your administrator priviledges, although I believe that should be giving you a different and more understandable error.