BoldSign®Effortlessly integrate e-signatures into your app with the BoldSign® API. Create a sandbox account!
Hello Syncfusion team,
Hope you are doing great.
I have an issue when using timestampserver ... the server is not stable all the time, sometimes it returns immediately and sometimes it takes a very long time, and Although i am setting the timestampserver with timeout only 10 seconds, the DigitalDocument.Save takes about 2 minutes to respond with timeout error ignoring the timeout i set
i am using Syncfusion.Pdf.WinForms 27.1.50 .netframework 4.6.2
DigitalSignature.TimeStampServer = New TimeStampServer(New Uri("mytsurl"), Nothing, Nothing, 10)
DigitalSignature.CreateLongTermValidity(certificatechainlist, RevocationType.Crl, True)
DigitalDocument.Save(filename.Replace(".pdf", "_Signed.pdf"))
please check this stack trace with timeout error after around 2 minutes
at System.Net.HttpWebRequest.GetResponse()
at Syncfusion.Pdf.Security.TimeStampServer.GetTimeStampResponse(Byte[] request)
at Syncfusion.Pdf.Security.PdfCmsSigner.Sign(Byte[] secondDigest, TimeStampServer server, Byte[] timeStampResponse, Byte[] ocsp, ICollection`1 crls, CryptographicStandard sigtype, String hashAlgorithm)
at Syncfusion.Pdf.Security.PdfSignatureDictionary.GetPKCS7Content()
at Syncfusion.Pdf.Security.PdfSignatureDictionary.DocumentSaved(Object sender, DocumentSavedEventArgs e)
at Syncfusion.Pdf.PdfDocumentBase.OnDocumentSaved(DocumentSavedEventArgs args)
at Syncfusion.Pdf.Parsing.PdfLoadedDocument.Save(Stream stream)
at Syncfusion.Pdf.PdfDocumentBase.Save(String filename)
Hi Jacobs,
Thank you for reaching out to the Syncfusion team.
To assist you further with the timestamp server timeout issue, could you please provide the following details?
Once we have this information, we will investigate the issue further and provide a resolution at the earliest.
Regards,
Irfana J
Hello Irfana,
The issue happens randomly not all the time, on a specific timestamp url which sometimes takes a very along time to respond.
There is no specific pdf it is just an empty pdf for testing.
Again the issue in brief is that the Document.Save function doesnt use the timeout for the timestamp server that i specified in the syncfusion property Timestampserver.timeout which is 10 seconds , and sometimes the timestampserver takes a long time to responds(more than 3 minutes) , i think it has a default timeout for the http request of about 2 minutes or 100 seconds.
I think you can simulate the case on your side if you have a local timestamp server and make it return the timestamp time after 3 or 4 minutes, the document.save will timeout with error after around 2 minutes.
I sent the code and the stack trace that happend with me at the time that the timeout issue occured in my previous reply.
I will be glad if you can check this function source code and its http request to the timestamp server and if it has a specified timeout.
Any call in any syncfusion function to the timestampurl should use the timeout specified in the syncfusion property Timestampserver.timeout .
Hi Jacobs,
Currently we are analyzing on the reported behavior with the provided details on our end and we will share the further details on February 12th, 2025.
Regards,
Irfana J.
Thanks Irfana, waiting for your reply 🙏
Hi Jacobs,
Regards,
Irfana J.
Thanks alot Irfana and syncfusion team for your usual support.
I appreciate fixing it in Document.Save and Creatlongtermvalidation function (or any function with timestampserver request) and returning error code and error message when catching exception to distinguish that the issue is related to timestamp server request timeout or other error.
It would be great if it is possible to provide a patch for the below version in order to test it before you include it in the next weekly relaease on 25/2/2025
Syncfusion.Pdf.WinForms 27.1.50 dotnetframework 4.6.2
Currently, we do not support a timeout function for creating long-term validation (LTV) during signing and signature validation. We have added this feature request to our list. Additionally, we do not have any immediate plans to implement this support. You can track the status of the feature using the following feedback link.
Ok that's good , i meant also the call to timestampserver url inside the createlongtermvalidation function becasue if i send the parameter includecertificates = true it gets the timestamp certificate chain in order to embed them in dss, so i want to make sure that the fix you will provide will include this also.
It would be great if it is possible to provide a patch for the below version in order to test it before you include it in the next weekly relaease on 25/2/2025 ... Syncfusion.Pdf.WinForms 27.1.50 dotnetframework 4.6.2
Hello Aribalakrishnan
i am waiting today for the patch for version Syncfusion.Pdf.WinForms 27.1.50 dotnetframework 4.6.2 windows forms
Also please provide me how will the function behave if timestamp call has timed out, and how will i be able to get the error in catch.
Hi Jacobs,
As requested, we have created a custom patch for the mentioned version. Please find the attached custom patch. Let me know if the reported issue has been resolved or not
Regards,
Aribalakrishnan G.
Thanks ... I will check it
Please provide me how will both functions behave (createlongtermvalidation and Document.Save) if timestamp call has timed out, and how will i be able to get the error in catch ... as the issue happens me randomly when the the timestamp server i am testing with takes a long time to respond and this i can't control.
Waiting for your reply.
Hi Jacobs,
As of now, we do not have any functionality to catch errors in the timestamp server. These errors are handled internally during timestamp server validation. You can check whether the timestamp server returns valid API results to determine if there is an error. Please find the API details below,
Regards,
Aribalakrishnan G
Iam already using this check before calling the createlongtermvalidation function and the document .save ... however the timeout happens after the checking and returns valid ... but while calling those two functions the timeout may happen ... which should have been fixed in this new version ... my question is will i get a specific error code or message when ts timeout happens ?
SignatureValidationErrors
Gets the list of signature validation exceptions. Please find the SignatureValidationErrors API details below,I am not asking for this ... i meant if an error related with timestamp api call times out when calling the Document.Save or the createlongtermvalidation ... this happens when creating new signature ... while signaturevalidationerrors is not related to creating signature ... it is just when validation so it will not be useful while creating new signature.
What i am asking for that if i set the timeout of timestampserver to 10 seconds in syncfusion object and for some reason the timestamp request that happens internally in library during calling createlongtermvalidation or document.save, the function should fail with exeption indicating timestamp timeout error ...
also i didnt find the bug fix in the release notes of today's version 28.2.7 (released 25 Feb 2025)
https://help.syncfusion.com/windowsforms/release-notes/v28.2.7?type=all
Hi Jacob,
We were unable to include the fix for the issue "Timeout functionality is not working properly in timestamp server API" as promised in the weekly release scheduled for today (25/02/2025). This fix will be included in the next weekly release (04/03/2025). Additionally, please confirm whether the custom patch provided has resolved the reported issue.
Regards,
Aribalakrishnan G.
Stil checking ... but i need an answer to my last reply
Hi Jacobs,
Currently, our library does not throw an exception when a timestamp server request times out during CreateLongTermValidation
or document.Save
. Instead, it caches the error internally and proceeds with signing the document without embedding the timestamp or LTV.
We understand your requirement to receive an explicit exception indicating a timestamp timeout error. At this time, our library does not provide this functionality. However, we have logged a feature request to enhance error handling for timestamp and LTV server request failures during the signing process.
While we don’t have immediate plans to implement it, we typically review all open feature requests during the planning phase of each release cycle, which occurs approximately every three months. We will consider this feature for future implementation and provide updates once it becomes available.
You can track the status of this feature request from the following feedback link,
Support to Retrieve Error Details for LTV and Time Stamp in PDF Save in WinForms | Feedback Portal
Regards,
Irfana J.
i checked todays update and still no documented changes for the new version 28.2.9 about the fix
it should be released today as promised before.
Hi Jacob,
Sorry for the inconvenience caused.
We are currently dealing with some issues in fixing automation problems. Our team is focused on resolving this quickly. Due to concerns about stability, we cannot include the fix in our last weekly update. We will ensure the solution is included in our next weekly NuGet release, which you can expect on March 11th, 2025.
Regards,
Aribalakrishnan G.
Hi Jacob,
Sorry for the inconvenience caused.
We are currently dealing with some issues in fixing automation problems. Our team is focused on resolving this quickly. Due to concerns about stability, we cannot include the fix in our last weekly update. We will ensure the solution is included in our next weekly NuGet release, which you can expect on March 11th, 2025.
Regards,
Aribalakrishnan G.
I will be waiting for the fix (same as custom nuget) next Tuesday, March 11th.
Hello Aribalakrishnan,
I am just making sure that the fix included in custom nuget will be included in tomorrow's release 11/03/2025.
Thanks again.
Good morning Irfana,
i am no getting any replies from syncfusion team.
Hi Jacobs,
Regards,
Irfana J
Dear Idrana,
Unfortunately the latest release 28.2.11 always returns error The remote name could not be resolved + the tsa url after
CreateLongTermValidation
function, i tested using different timestamp urls and all the same result , however the custom package is working fine.
Waiting for the fix as soon as possible. Thanks
Hi Jacobs,
HttpWebRequest
, where the timeout unit is in milliseconds. The conversion from seconds to milliseconds was missing when setting the HttpWebRequest
timeout.PdfDocument document = new PdfDocument(); PdfPage page = document.Pages.Add(); X509Certificate2 cert = new X509Certificate2(@"D:\Works\Febmonth\Feb20\timeserverpatch\BUG934210.pfx", "syncfusion"); PdfCertificate pdfCert = new PdfCertificate(cert); PdfSignature signature = new PdfSignature(document, page, null, "syncfusion"); signature.Bounds = new RectangleF(new PointF(0, 0), new SizeF(100, 100)); signature.ContactInfo = "johndoe@owned.us"; signature.LocationInfo = "Honolulu, Hawaii"; signature.Reason = "I am author of this document."; TimeStampServer timeStampServer = new TimeStampServer(new Uri("https://rfc3161.ai.moda/adobe"), "", "",30000); signature.TimeStampServer = timeStampServer; signature.EnableLtv = true; signature.CreateLongTermValidity(new List<X509Certificate2> { cert }); document.Close(true); |
Irfana J
ok thanks , i will check this workaround , but i hope you fix this issue in the next release on 25 March 2025.
Hi Jacobs,
Due to volume 1 main release published code unfreeze. We will include the reported issue in the upcoming weekly release, which is expected on April 2nd, 2025.
Regards,
Aribalakrishnan G
.
Thanks ... i will be waiting for the fix in next week release ... i am using 10000 as timeout as a temp solution