Sign xml with smartcard

Y

Yuki

Hi all,
I'm trying to use a smartcard to sign a xml document...
//xDoc is my xml to sign
SignedXml sXml = new SignedXml(xDoc);
//cert is a X509Certificate2 from my smartcard.
sXml.SigningKey = cert.PrivateKey;

The error occurs in [sXml.SigningKey = cert.PrivateKey;].

Anybody can help me?

Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top