Cosmin Ionascu
Cosmin Ionascu

Reputation: 7508

Decrypt SSIS password node

I have an SSIS package that I want to execute from a WCF service. And I want the password to be stored inside the package. In the project I've set the ProtectionLevel to EncryptSensitiveWithPassword and added the password for the package and project. All good so far. The problem happens when I try to execute the package from the service. It throws 2 errors saying that it cannot decrypt the encrypted XML node because the password was not specified or is not correct. I've added the password for the package like so

package.PackagePassword = password;

Afterwards it's telling me that the login failed for the user (which I think is kind of obvious since it failed to decrypt the password node) and the execution stops.

The reason I want to do this is to avoid having to manually edit the .dtsx file and add the password for the connection.

Also I'm the owner of the package (I've read that it might be a problem with this when the user that created the package is not the same as the user who executes it, and also I've doubled checked the password and the protection level, and the password is correct and the protection level is not set to EncryptSensitiveWithUserKey.

Any advice on how to proceed?

Upvotes: 4

Views: 963

Answers (1)

Cosmin Ionascu
Cosmin Ionascu

Reputation: 7508

After much investigation I've came to the conclusion that this approach is just not going to work. So for anyone interested in storing the password for the connection inside the .dtsx just save the package with DontSaveSensitive and manually add the password in the connection string of the package.

Upvotes: 1

Related Questions