In the following code snippet:
Microsoft.Web.Services.Security.Signature sig;
try
{
sig = new Signature(x509Token);
}
catch(Exception ex)
{
txtStatus.Text = ex.Message + "-" + x509Token.Certificate.GetName();
}
txtStatus has
The handle is invalid-C=US, PostalCode=91436, S=California, L=Los
Angeles,etc...
The exception is "The handle is invalid"
Followed by our certificate name.
This runs on several development computers we have here but not an a Windows
2003 Server. I know I'm missing setting something on the Windows 2003 Server
but I'm not sure what. Can anyone point me to what I should be looking at.
Thanks.
Gabe Garza - 21 Feb 2006 08:43 GMT
Solved this.
Turns out in Windows 2003 you need to give the "NETWORK SERVICE" account
access to the certificate.
I'm not sure what's correct but I've noticed posts that say give ASPNET
access to the RSA or MachineKeys directory, but since the web application I
have uses only one certificate I give access to the ASPNET account or now the
"NETWORK SERVICE" account to a certificate not the RSA or MachineKeys
directories.
Anyone have comments to this?
> In the following code snippet:
> Microsoft.Web.Services.Security.Signature sig;
[quoted text clipped - 18 lines]
>
> Thanks.