Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6574913
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:19:20+00:00 2026-05-25T15:19:20+00:00

I am writing a c# winform desktop application that is in contact with a

  • 0

I am writing a c# winform desktop application that is in contact with a MYSQL database. Of course I cannot leave the database credentials out in the open hard-coded into the application, so where can I store this information so that a nosey customer will have an extremely tough time locating it?

I understand that if someone is very determined to find this information they will most likely do just that, but I want to be able to hide these credentials from the average Joe, leaving me with some peace of mind at the end of the day.

If your answer is to encrypt the credentials, and hard code the encrypted values into the program, please explain which encryption methods to use. Furthermore, where would I store the necessary decryption/encryption keys?

I very much look forward to some interesting responses.

Thank you,

Evan F.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T15:19:21+00:00Added an answer on May 25, 2026 at 3:19 pm

    http://www.ezzylearning.com/tutorial.aspx?tid=8067328

    Store it in App.Config File.

    Check out above tutorial.

    You can also check this good article by Microsoft which teach you how to encrypt and retrieve.

    http://msdn.microsoft.com/en-us/library/ms254494.aspx

    One of Previous Posts

    if you have installed Microsoft Enterprise Library, you can easily encrypt/decrypt using its tool as mentioned in this link

    http://davidhayden.com/blog/dave/archive/2006/01/23/2744.aspx

    http://davidhayden.com/blog/dave/archive/2006/03/02/2870.aspx

    Also, after the installation, open the project in studio and right click on the web.config or app.config and you will see the option for the configuration though Enterprise Library. This option is available in Visual Studio 2005 but I cannot see this in Visual Studio 2008 yet. Not sure whether its not compatible with 2008 or I have to follow some installation sequences. I will let you guys know if I come across with any solutions.

    This is the link which explains how to work with encryption within studio http://www.pnpguidance.net/Post/EnterpriseLibrary3VisualStudioIntegratedConfigurationEditor.aspx . Read, read & read…

    Keep in mind that once you open the .config file you have luxuary of ecrypting each pieces/blocks seperately. Thats the beatuy of it.

    For your information I am using Enterprise Library 3.1 which is the latest version and has tonnes of tools that makes your life a breeze. You can download this library at http://msdn2.microsoft.com/en-us/library/aa480453.aspx. Also, look forward for 4.0 at http://www.codeplex.com/entlib


    Bottom line you can search google along these lines and I am sure it will give you the whole process.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I find that writing web apps and WinForm apps generally come out a lot
I am writing a C# winform application that starts a second process to execute
I have written a winform application that connects to a database on our corporate
I'm writing a WinForms application that sends email messages (like a mail merge). I'd
On this winform application I am writing, I want to secure one menu item
We're writing a .NET winform application and I'm looking for options on one of
I'm interessted in writing an application that is running on windows mobile. I've allready
I am writing an application in .NET Winform. The data files produced are required
I'm writing a WinForms database application using SQLite and C#. I have a sqlite
I'll be writing a small desktop app for a client that has WinXP machines

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.