Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Sign method
Collapse the table of content
Expand the table of content

SignedDataBlock.Sign method

Invokes the Sign dialog box for adding a digital signature to the set of data represented by the specified SignedDataBlock object.

Namespace:  Microsoft.Office.InfoPath
Assembly:  Microsoft.Office.InfoPath (in Microsoft.Office.InfoPath.dll)

public abstract void Sign()

ExceptionCondition
InvalidOperationException

Form code attempted to write to the underlying XML document after signing was initiated.

SecurityException

The form template is not configured for Full Trust using the Security and Trust category of the Form Options dialog box.

The new signature uses the default signature template, which is applied to the set of data represented by the specified SignedDataBlock object. Calling this method advances to the second step in the signing process which is performed using the Sign dialog box: verifying that the form or section being signed is correct and specifying additional information that will be stored with the digital signature, such as selecting a picture to use as a signature, and specifying the purpose for signing. The user can also choose to sign using a different digital certificate.

This member can be accessed only by forms opened from a form template that has been configured to run with full trust using the Security and Trust category of the Form Options dialog box. This member requires full trust for the immediate caller and cannot be used by partially trusted code. For more information, see "Using Libraries from Partially Trusted Code" on MSDN.

This type or member can be accessed only from code running in forms opened in Microsoft InfoPath Filler.

The following example will invoke the Sign dialog box for the set of data represented by the specified SignedDataBlock object.

this.SignedDataBlocks[0].Sign();
Show:
© 2015 Microsoft