user441521
user441521

Reputation: 6998

ASP.NET MySQL.NET connection string

I have an ASP.NET page that uses the MySQL.NET library to access a MySQL DB on the server. My question is about storing the connection string in the web.config. The MySQL.NET connection string looks like:

"server=localhost;user=user;database=db;password=pw"

I have to assume having the pw in the web.config as plain text isn't a good thing. What are my options to getting around this?

Upvotes: 0

Views: 231

Answers (2)

Lloyd
Lloyd

Reputation: 29668

You can encrypt Web.config using "Protected Configuration". See here on MSDN for a full overview of the process:

http://msdn.microsoft.com/en-us/library/dtkwfdky(v=vs.100).aspx

Upvotes: 1

Kinexus
Kinexus

Reputation: 12904

You can encrypt the connection string in your web.config.

For more information : Securing Connection Strings

Upvotes: 1

Related Questions