Package.LoadUserCertificateByName Method

Loads the certificate for the package according to the certificate name.

Namespace: Microsoft.SqlServer.Dts.Runtime
Assembly: Microsoft.SqlServer.ManagedDTS (in microsoft.sqlserver.manageddts.dll)

public void LoadUserCertificateByName (
	string subjectName
public void LoadUserCertificateByName (
	String subjectName
public function LoadUserCertificateByName (
	subjectName : String



The name of the certificate for the package.

The following code example shows the syntax to load a user certificate using the name.

using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.SqlServer.Dts.Runtime;

namespace Package_API
    class Program
        static void Main(string[] args)
            Application app = new Application();
            Package pkg = new Package();

            pkg.Name = ("Cool Test on Loading Certificates");
            pkg.LoadUserCertificateByName("\"VeriSign, Inc.\", VeriSign Trust Network, \" Incorp. by Ref.,LIAB.LTD(c)98\", Persona Not Validated, Digital ID Class 1 - Microsoft, <name>, <alias>");

            // Save signed package  to change_this.dtsx
            app.SaveToXml("change_this.dtxs", pkg, null);
            app.CheckSignatureOnLoad = false;
            pkg = app.LoadPackage("change_this.dtxs", null);
            DTSSignatureStatus dss = pkg.CheckSignature();

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.

Development Platforms

For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server 2005.

Target Platforms

Community Additions