Link to home
Start Free TrialLog in
Avatar of mainrotor
mainrotor

asked on

I need help connecting to my DB, securely, from my VB.Net application

Hi Experts,
I just got a request asking me to remove, or encrypt the connection string information from my VB.Net WinForm applications.

A suggestion was to store the connection string in the database and retrieve it somehow.  How would I connect to the sql server database to retrieve my connection string if I don't have my credentials in my Vb.Net application?  How can this be accomplished?

Thanks in advance for your help,
mrotor
ASKER CERTIFIED SOLUTION
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
nopoints:
@tapan: he is using a windows forms application not a web application therefor no web.config. ErgoÉric Moreau's suggestion of using app.config is correct
Hi David, You are correct. Thanks for the suggestion.

Hi  mainrotor,

The suggesting I have mentioned above having ID: 41862895 needs to be slightly changed. You have to temporarily rename the App.Config file to Web.Config for performing the above steps which I have mention having ID: 41862895.

Note: The aspnet_regiis.exe Command Line Utility of the Visual Studio does not recognize for App.Config files and hence we need to temporarily rename the App.Config file to Web.Config.

For more details Please check the below links:

http://www.aspsnippets.com/Articles/Encrypt-and-Decrypt-Connection-String-in-AppConfig-file.aspx
both good but mine requires less manipulations