1

If one has a connectionstring in one's application, is there a way to encrypt the information it contains?

The connection string is created using the SqlConnectionStringBuilder object.

Or is it 'acceptable' that sensitive information is sent in plaintext to the server?

2
  • So what do you want to encryt? The (local) sql connection string that configures the client access? Or the communication on the wire between a client and a remote user? I understand you're using SQL users, not windows authentication? Commented Dec 26, 2009 at 10:38
  • I want to mainly encrypt the password that is sent on the wire to the server in the connection string. Commented Dec 26, 2009 at 11:27

2 Answers 2

2

well you can use AES for example, to encrypt the data, send the encrypted connection string to the database computer. on that computer you need to build a listener that is getting the encrypted connection string and then decrypt it and connect to server. you need to build a softwere between the database computer and the user computer if you want to encrypt\decrypt all the data, but for the ConnectionString that the way...(encrypt -> send it to the server to a listener -> decrypt)

Hope it helps. Amit.

Sign up to request clarification or add additional context in comments.

Comments

1

Hope this helps.

Is it 'acceptable' that sensitive information is sent in plaintext to the server?

It depends on how much level of security you want for you application, as security critical apps might need encryption of the connection string.

Use encryption sparingly and judiciously though - there is a performance hit.

Edit: Changed the link, Linked to MSDN (more info)

Thanks

1 Comment

This is good, but as my connection string is created at runtime in my application, I cannot place it in a app.config file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.