SQL Server Connection String: Can the password be encrypted in line? I have an app, a commercial app, that stores its connection string in clear in the registry.

When I used a trusted connection to SQL Server, this is fine (the user id and password are in the IIS app, and are stored encrypted within IIS).

I now must move to SQL auth, and away from a trusted connection (long story).

I dream of a conn string like this:

Server=myServerAddress;Database=myDataBase;User Id=myUsername;
Password=@#$@#@%#$%#$&lt;encrypted password&gt;@#$@#$;encryptedpassword=yes;


And a way that I can encrypt the pw (using the machine key or such).

Is there a path in this direction?
This is more for SO than DBA, but if you are using the identity/password for the app pool in IIS it will encrypt the password for you when it is stored. However, be aware that even with this process passwords can still be decrypted with not much work.

The connection string itself does not allow you to enter an encrypted password, the mechanism that is saving the connection string handles encrypting sensitive data (or should).