I have a scenario where I have multiple signature fields in a PDF file (one on each page). I'm able to successfully sign them (having to save/reload after each signature), but if I set the TimeStampServer on more than one PdfSignature then the Save method hangs for around 2 minutes (the timeout setting on the TimeStampServer doesn't seem to make a difference). Also it seems to hang if I try to timestamp another document (without restarting my application), but that issue doesn't seem to be consistent. If I remove the TimestampServer setting then everything is working.
I have Fiddler running and I can see the request going out to the timestamp server (http://rfc3161timestamp.globalsign.com/advanced) and returning in less than 500ms. I also see that first there's a POST, then a GET, which is a little odd.
I'm using SF via NuGet 19.2.0.44 and I have a license string entered. Unfortunately this is part of a larger system so I don't have a good example.
Hello,
I tried it in a console, and there it works of course, so it may be something else. We'll close this issue for now. Thank you.
So I run into this issue from time to time, it seems to happen more commonly when the system is stressed. I've analyzed a memory dump I took from a hung system and the call stack shows that it's lockup in the TimeStampServer.GetTimeStampResponse method. I've also analyzed the reverse-engineed code for this method, and it seems to me that the timestamp that you can set in the constructor isn't honored/used in the GetTimeStampResponse. So it will lock up for a very long time (forever perhaps, not sure if the HttpWebRequest has a default timeout). This seems like a bug.
Hi Hakan,
We have checked with our test timestamp servers. It is working properly without any hanging issues. As we request earlier, to share more details to replicate the reported issue on our end. So, Kindly share the complete code snippet or modified sample, input document, certificates details, Timestampserver details, video to analyze further and provide a solution at the earliest possible.
Regards,
Surya V
It seems to be related to stressing it, and it may even be related to the timestamp servers used (we're using http://timestamping.ensuredca.com). It won't hang if you just call it once. I believe the code in GetTimeStampResponse) isn't correct HttpRequest code, it's not setting the timeout and it may also be missing a Dispose on the HttpWebResponse.
Hi Hakan,
We were not able to check with the provided timestamp server. On our end, The timestamp server throws 404-server not found error. We have attached the snapshot for your reference,
|
|
Note: we did not face any kind of hanging issue through the timestamp in digital signature on our test cases. So, we already requested more details, kindly share them to replicate the issue and provide the solution at the earliest.
Regards,
Surya V