we have a question and a Problem:
Q: Is there a way to change the standard Icon for the .DigiSignWithStamp method?
The used icon consisting of an head with a question mark always brings up to these questions "Why is there a question mark? Does this mean the user wasn't found? Is the signature valid when there is a question mark?"
By the way, the little black borders of the head makes it much difficult, to read the overlayd text.
P: We are running a IIS7 webserver on a 64-bit machine under Windows Server 2008 SP1.
We created a little application, where the user can examine scanned .jpg-images. After validating the content, the user should be able to sign a PDF-file containing these images.
Everything works fine so far, we create the PDF-file from the scanned Images on the fly. But when trying to apply the .DigiSignWithStamp or .DigiSign method, we get an "Internal Error" of the System.Security.Cryptography assembly.
I've compiled your sample applicatione "Digital Signing PDF" and could run it as an .exe from this webserver without any problems. Of course I used the same certificate and signing Image and paramters.
Both, the asp.net application and the sample application uses .net Framework 3.5.
Do you have an hint?
Thank you for your efforts in advance.
Erwin
Here the error text:
[CryptographicException: Interner Fehler.]
System.Security.Cryptography.CryptographicException.ThrowCryptogaphicException(Int32 hr) +33
System.Security.Cryptography.X509Certificates.X509Utils._LoadCertFromBlob(Byte[] rawData, IntPtr password, UInt32 dwFlags, Boolean persistKeySet, SafeCertContextHandle& pCertCtx) +0
System.Security.Cryptography.X509Certificates.X509Certificate.LoadCertificateFromBlob(Byte[] rawData, Object password, X509KeyStorageFlags keyStorageFlags) +203
System.Security.Cryptography.X509Certificates.X509Certificate2..ctor(Byte[] rawData, String password) +131
gdpicture_ឹ.gdpicture_ᜀ(Stream A_0, String A_1) +220
gdpicture_។.gdpicture_ᜁ(Stream A_0, String A_1) +33
gdpicture_។.gdpicture_ᜅ(String A_0, String A_1) +74
GdPicture11.GdPicturePDF.DigiSign(String DstPDFPath, String CertPath, String Password, String Reason, String Location, String ContactInfo, String SignerName, Boolean Linearize, PdfSignatureMode SignatureMode) +80
GdPicture11.GdPicturePDF.DigiSign(String DstPDFPath, String CertPath, String Password, String Reason, String Location, String ContactInfo, String SignerName, Boolean Linearize) +33
GdPicture11.GdPicturePDF.DigiSign(String DstPDFPath, String CertPath, String Password, String Reason, String Location, String ContactInfo, String SignerName) +28
ASP.clearingportal_boschtt_pdfsigning_signing_user_aspx.cmdSend_Click(Object sender, EventArgs e) in D:\Daten\Intranet.SSL\ClearingPortal-BOSCHTT\PDFSigning\Signing_User.aspx:186
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565
Here the code:
Code: Select all
m_GdPicturePDF.LoadFromFile(tmpPDFFile, False)
tmpPDFFile = "\\NAS1\Scannen\BOSCH\Thermotechnik\Signed.pdf")
m_GdPicturePDF.SetMeasurementUnit(PdfMeasurementUnit.PdfMeasurementUnitInch)
m_GdPicturePDF.SetOrigin(PdfOrigin.PdfOriginTopLeft)
'status = m_GdPicturePDF.DigiSignWithStamp(tmpPDFFile, WritePath &"\Certificate_User00001.pfx", "XXXX", txtSigReason.Text, txtSigOrt.Text, lblAbteilung.Text, lblSignierer.Text, stampResName, 2.5, 1.5, 2, 0.7, True)
status = m_GdPicturePDF.DigiSign(tmpPDFFile, WritePath &"\Certificate_User00001.pfx", "XXXX", txtSigReason.Text, txtSigOrt.Text, lblAbteilung.Text, lblSignierer.Text)
m_GdPicturePDF.CloseDocument()