Reputation: 148
I'm sending the smart card certificate from the user store into the constructor for CmsSigner to sign PKCS encryption using a smart card. And i get an error saying "Provider could not perform the action since the context was acquired as silent." in web Application in IIS 7.5. This is working fine IIS 6.0 With Impersonation. I had used Impersonation with IIS 7.5 but result is Same.
This is working fine with Windows form application on same machine and same e-Tocken. I am Using Aladin E-token.
ContentInfo contentInfo = new ContentInfo(msg);
SignedCms signedCms = new SignedCms(contentInfo, false);
CmsSigner cmsSigner = new CmsSigner(signerCert);
cmsSigner.SignedAttributes.Add(new Pkcs9SigningTime());
signedCms.ComputeSignature(cmsSigner);
After Some Google I find same question Here . But it is not answered.
Any help will be appreciated.
Thanks in advance
Upvotes: 3
Views: 2777
Reputation: 148
My Problem was proper rights was not given so i had Change Identity of Application pool from ApplicationPoolIdentity to LocalService Account in IIS Server and everything works fine.
Upvotes: 0
Reputation: 81
I've got same error when i was trying to sign data using smart card and this card was protected by PIN.
Instead of
signedCms.ComputeSignature(cmsSigner);
I used
signedCms.ComputeSignature(cmsSigner, false);
After calling this method prompt window for PIN was shown. I wrote PIN and signing was successful.
Upvotes: 7