Ashish Ashu
Ashish Ashu

Reputation: 14677

How to encrypt Sql connection string?

I have a WCF Service which connect to Sql Server 2005 to retrieve and send data according to the method invoked.

Currently I am using a hard coded sql connection string in .cs file to create a connection.

Let me know what is the best way to use the connection string or where i place the connection string?

Please help!!

Upvotes: 1

Views: 1683

Answers (1)

Max
Max

Reputation: 2581

Assuming that the connection string is in the web.config, you can use the DataProtectionConfigurationProvider and RSAProtectedConfigurationProvider to encrypt it.

Encrypting Connection Strings

Upvotes: 3

Related Questions