Hello Readers,
I'm trying to create a web service client using VS .NET 2003 along
with WSE 2.0 under Win2K Prof. I'm having trouble using a X.509
digital certificate as it seems my app generates a windows exception
when trying to read the private key of the certificate. I believe the
digital certificate is installed on my machine as I can see it in both
mmc and the X509 Certificate Tool that comes with WSE 2.0. Also, both
tools indicate that the certificate contains a private key. In my
app, I'm using the X509Certificate**** classes to retrieve the
certificate and when I step through the code using the debugger and
Watch the contents of the retrieved certificate object, the value of
the Key attribute is:
<error: an exception of type:
{System.ComponentModel.Wind32Exception} occurred>
And sure enough if I try to call something like cert.Key, an exception
is thrown.
Now my desparate search of newsgroups came across several recent
threads that mention WSE expects the private key to be in C:\Documents
and Settings\All
Users\Application Data\Microsoft\Crypto\RSA\MachineKeys. Using the
X509 Certificate tool, I found that the private key file is located in
C:\Documents and Settings\Administrator\Application
Data\Microsoft\Crypto\RSA\S-1-5-21...
The certificate was installed in the Root Store of Local Computer.
My question is whether WSE does expect the private key file to be in
the MachineKeys directory. If so, how does one manipulate the
installation of the digital certificate to make it go into that
directory?
Any insight would be appreciated.
Norm.
SA - 10 Sep 2004 20:03 GMT
Try installing the certificate in the Personal store of the local computer.

Signature
Sven
> Hello Readers,
>
[quoted text clipped - 33 lines]
>
> Norm.
Norm - 13 Sep 2004 06:39 GMT
Sven,
Trying to install certificate (.p12 file) into Personal Store as
suggested using the Certificate Import Wizard in Win2K but when I try
to specify a location store, the choices I get are:
Personal
-> Registry
Trusted Root Certificate Authorities
-> Registry
-> Local Computer
Enterprise Trust
-> Registry
-> Group Policy
-> Local Computer
Intermediate Certificate Authorities
-> Registry
-> Group Policy
-> Local Computer
Which one would be the Personal store of the local computer...or
should I be using a different import tool?
Norm.
> Try installing the certificate in the Personal store of the local computer.
>
[quoted text clipped - 35 lines]
> >
> > Norm.
D.Mitchell - 15 Sep 2004 14:45 GMT
Use MMC. Add the Certificates snap-in. Select computer account. Then import
the certificate under the Personal folder.
I can pick up the certificates programmatically. I have a problem in that
WSE 2 cannot pick up certificates for decryption or signature verification
when a message is recieved.
> Sven,
>
[quoted text clipped - 59 lines]
> > >
> > > Norm.