Compartir a través de


Package.CheckSignatureOnLoad Property

Gets or sets a value that indicates whether the digital signature is checked when a package is loaded from XML.

Espacio de nombres: Microsoft.SqlServer.Dts.Runtime
Ensamblado: Microsoft.SqlServer.ManagedDTS (in microsoft.sqlserver.manageddts.dll)

Sintaxis

'Declaración
<BrowsableAttribute(False)> _
Public Property CheckSignatureOnLoad As Boolean
[BrowsableAttribute(false)] 
public bool CheckSignatureOnLoad { get; set; }
[BrowsableAttribute(false)] 
public:
property bool CheckSignatureOnLoad {
    bool get ();
    void set (bool value);
}
/** @property */
public boolean get_CheckSignatureOnLoad ()

/** @property */
public void set_CheckSignatureOnLoad (boolean value)
public function get CheckSignatureOnLoad () : boolean

public function set CheckSignatureOnLoad (value : boolean)

Valor de propiedad

A Boolean that indicates if the digital signature is checked when the package is loaded. A value of true indicates that the digital signature is validated when the package is loaded. The default value is false.

Notas

If CheckSignatureOnLoad is enabled, all packages are examined for a digital signature when they are loaded. The signature is validated by checking the CertificateContext property of the package. If the certificate is validated, the package is opened without any messages to the user. If the certificate is not trusted, a warning message appears and allows you to interactively decide if you want to trust the contents.

Ejemplo

The following example loads a package, and then retrieves and displays the CheckSignatureOnLoad property.

class PackageTest
    {
        static void Main(string[] args)
        {
            // The variable pkg points to the location
            // of the ExecuteProcess package sample 
            // that is installed with the samples.
            string pkg = @"C:\Program Files\Microsoft SQL Server\90\Samples\Integration Services\Package Samples\ExecuteProcess Sample\ExecuteProcess\UsingExecuteProcess.dtsx";
            
            Application app = new Application();
            Package p = app.LoadPackage(pkg, null);
    
            // Once the package is loaded, this sample can
            // query on several properties
            Boolean checkSig = p.CheckSignatureOnLoad;
            Console.WriteLine("CheckSignatureOnLoad = " + checkSig);
            
        }
    }
Class PackageTest
        Shared  Sub Main(ByVal args() As String)
            ' The variable pkg points to the location
            ' of the ExecuteProcess package sample 
            ' that is installed with the samples.
            Dim pkg As String =  "C:\Program Files\Microsoft SQL Server\90\Samples\Integration Services\Package Samples\ExecuteProcess Sample\ExecuteProcess\UsingExecuteProcess.dtsx" 
 
            Dim app As Application =  New Application() 
            Dim p As Package =  app.LoadPackage(pkg,Nothing) 
 
            ' Once the package is loaded, this sample can
            ' query on several properties
            Dim checkSig As Boolean =  p.CheckSignatureOnLoad 
            Console.WriteLine("CheckSignatureOnLoad = " + checkSig)
 
        End Sub
End Class

Sample Output:

CheckSignatureOnLoad = True

Seguridad para subprocesos

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Plataformas

Plataformas de desarrollo

Para obtener una lista de las plataformas compatibles, vea Requisitos de hardware y software para instalar SQL Server 2005.

Plataformas de destino

Para obtener una lista de las plataformas compatibles, vea Requisitos de hardware y software para instalar SQL Server 2005.

Vea también

Referencia

Package Class
Package Members
Microsoft.SqlServer.Dts.Runtime Namespace