Saturday, January 06, 2007

WSE 2.0 Samples and certificate access problem

I was trying the WSE 2.0 samples today and I had a problem with the asymmetric encryption sample. I was getting a "server unavailable" error when running the client. On the Event Viewer I saw in the exception details the error "Private Key is not available".

The problem was that the ASPNET account, under which the web service is running on IIS (for .NET 1.1 on XP), did not have access to the private key stored in the Local Computer/Personal certicicates folder.

Access to the ASPNET account can be granted using the WSE Certificate Tool, opening the Local Computer/Personal and pressing the "View Private Key File Properties" button. Of course, "Use simple file sharing" should be disabled from Explorer's Tools/Folder Options/View tab for Windows XP in order to view the Security tab when opening the private key file properties.

I also found this very nice article about X.509 certificates in WSE which also describes the above process (unfortunately after I already had spent few hours to solve the problem).

1 comment:

Anonymous said...

Good for people to know.