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 366623
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T13:39:01+00:00 2026-05-12T13:39:01+00:00

Ok, I know this has been asked a thousand times before, but no conclusive

  • 0

Ok, I know this has been asked a thousand times before, but no conclusive solution has been derived…so here is another really silly question!

I have a Winforms 3.5 app and using LINQ to SQL, hence the Connection string is ALWAYS stored in “app.config” by default (and VS2008 will not accept any other way of storing this – Ive even tried overwriting this in the IDE-generated code). That being said, any person with a bit of computer know-how needs to just browse to the install directory of the app, look for the [appname].exe.config file, and open it to reveal the supposed secure username/password for accessing the database. Even if you opt to encrypt/decrypt this section, it is only done when the app is running – so Im assuming that when the app is closed, the connString section reverts to plain text….that can be once again read. (….how do you win?!?!)

Keeping in mind that Im using LINQ and generating a LinqDataContext, what I would like to know is this:

  1. Can the connstring not be stored elsewhere besides the app.config? (perhaps like in a user setting file that can be modified after installation)
  2. If the above is possible, can I not store a pre-encrypted connstring into the config file (that certainly wont be able to be read) and in my application, opt only to decrypt the connstring whenever the connection is opened?

If none of this is possible, I may have to revert to using traditional ADO.NET (seeing that I already have hundreds of stored procs for all CRUD operations) – at least that way I can have control over how and where the connstring is stored.

BTW – sorry if this is a juvenile/confusing question to ask, and if you feel that Im wrong with anything Im explaining please let me know.

Much thanks!

  • 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-12T13:39:02+00:00Added an answer on May 12, 2026 at 1:39 pm

    You can store a pre-encrypted conn-string in the app.config, but i guess it will be useless since, your application sooner or later will decrypt the conn-string (And the plain text will be availiable to anyone interested!)

    So you should obtain an SSL cerificate too… (Not a self signed one)

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

Sidebar

Related Questions

I know this has been asked a few times before, but the existing solutions
I know this question has been asked many times, but here are my specific
I know this has been asked multiple times here, but I've a different issue
I know this question has been asked before, but I ran into a problem.
I know this question has been asked a bit before. But looking around I
I know this specific question has been asked before , but I am not
I know this has been asked thousands of times but I just can't find
I know this has been asked before, but I've found a different way to
I know this has been asked a lot of times in StackOverflow already, but
I know this has been asked many times, but I don't understand what is

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.