Multiple signatures with timestamp server hangs Save

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.


6 Replies 1 reply marked as answer

GK Gowthamraj Kumar Syncfusion Team August 9, 2021 11:42 AM UTC

Hi Hakan,

Thank you for contacting Syncfusion support.

We did not face this type of issue on our end. We suspect that the reported hanging issue may occurs due to response are returned properly from TimeStampServer URL. Please confirm whether you are using same Timestampserver for all the signature field. Also we request you to share the complete code snippet, input document, certificates details, Timestampserver details, video to analyze this on our end.
So, that it will be helpful for us to analyze and assist you further on this.      
 
Regards, 
Gowthamraj K 


Marked as answer

HL Hakan Lindestaf August 10, 2021 01:28 PM UTC

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.



HL Hakan Lindestaf March 10, 2022 07:26 PM UTC

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.



SV Surya Venkatesan Syncfusion Team replied to Hakan Lindestaf March 11, 2022 06:46 PM UTC

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



HL Hakan Lindestaf March 11, 2022 06:51 PM UTC

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.



SV Surya Venkatesan Syncfusion Team replied to Hakan Lindestaf March 14, 2022 05:27 PM UTC

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


Loader.
Up arrow icon