SignedDataBlock.Sign Method

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

Namespace: Microsoft.Office.InfoPath
Assembly: Microsoft.Office.InfoPath (in microsoft.office.infopath.dll)

Syntax

'Declaration
'Usage

Exceptions

Exception type Condition

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.

Remarks

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 as 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 Office InfoPath 2007.

Example

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

this.SignedDataBlocks[0].Sign();
Me.SignedDataBlocks(0).Sign()

See Also

Reference

SignedDataBlock Class
SignedDataBlock Members
Microsoft.Office.InfoPath Namespace