Encrypting Sensitive Properties in a Custom Connection Manager

SSIS provides a mechanism to automatically encrypt the sensitive properties of your Connection Manager (or Task) based on the package ProtectionLevel. To make use of this in your custom code, you’ll need to do two things:

  1. Implement the IDTSComponentPersist interface
  2. Add a Sensitive=”1” attribute to one or more elements of your persisted Connection Manager (or Task)

Sample code:

How to Localize Your Custom Task

The DtsTask attribute has a LocalizationType member. This should be your resource class. SSIS will look for two properties:

  • TaskDisplayName
  • TaskDescription

These must be public, static string properties on your “LocalizationType” class.

Your task code would look like this:

You can add localizable string resources to your class from the Project settings:


Note, the Access Modifier must be set to Public.

Double note (as I hit this when putting together the blog post) – in SQL 2012, when you first add a new task to your <sql>110DTSTasks directory, you can right click on the SSIS Toolbox and select Refresh Toolbox to make it show up.


If your LocalizationType settings are incorrect (for example, you forgot to set the Access Modified to Public), your task will show up with an empty name. You must fix your class and rebuild, but you’ll need to restart Visual Studio before the changes take effect (as the class has been instantiated, SSIS will have the old object cached…).

Automatically Select Input Columns in a Custom Data Flow Component

The following code snippet can be used in a custom data flow component to automatically select all input columns when you attach a path.

This is the equivalent to clicking the Select All box in the Advanced Editor.