I have a problem with .NET COM+ component which cannot access the private
key of the client certificate. The problem seems to be that when the user on
which privileges the COM+ server application is running is logged in, the
certificate can be accessed. But as soon as the user logs out the I get
forbidden errors on the server.
I've tried to put the certificate in the users personal store and in the
local machine personal store and granting privileges to it using
WinHttpCertCfg.exe.
I'm not entirely sure the problem is caused by the accessing the certificate
store, but in my mind it seems to be the only explanation on this.
The same source code is running also as a web service (we have COM+ Client
and Web Service Client which both are using the same DLL to call the web
service). But with the web service we haven't had any problems.
The public key of the certificate is exported to directory accessible by the
user running the component and the code to put the certificate to the request
is as follows:
this.m_ecdssrv.ClientCertificates.Add( X509Certificate.CreateFromCertFile(
str_CertPath ) );
On the end point server the eventlog shows:
2008-01-31 06:30:08 192.168.158.2 POST /ecdsweb/ECDSResolver.asmx - 443 -
195.24.29.178
Mozilla/4.0+(compatible;+MSIE+6.0;+MS+Web+Services+Client+ Protocol+1.1.4322.2407)
403 7 5
PS. I thought that this problem is caused by server so I posted this to
windows server forum where they thought that the problem is related to our
component and not to a server.