SignAndGetXml throws XadesNetLib.Exceptions.InvalidParameterException

Jan 28, 2011 at 10:13 AM

My code:

 XmlDocument document = XadesNetLib.XAdES.XadesHelper.Sign(xml).Using(certificate).IncludingCertificateInSignature().SignAndGetXml();

throws XadesNetLib.Exceptions.InvalidParameterException: Path of signed file cannot be null

I think this is a bug.

On the other hand

 XadesNetLib.XAdES.XadesHelper.Sign(xml).Using(certificate).IncludingCertificateInSignature().SignToFile(Server.MapPath("~/output.xml"));  works just fine.

 

Coordinator
Jan 31, 2011 at 3:56 PM

Hello,

It is not really a bug, but a lack of functionality. When we first conceived the library, in order to maintain extreme simplicity, we thought an output file would be always needed. So, we considered not to specify this path an error.

I'll create an issue to give the functionality you provide: In case an output path is not provided, the library will return the XmlDocument, not raising an exception.

Regards,

Luis

Coordinator
Jan 31, 2011 at 3:57 PM

Issue created: http://xadesnet.codeplex.com/workitem/38