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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T20:00:37+00:00 2026-06-10T20:00:37+00:00

I understand there are a lot of ways of encrypting an SQLConnection string so

  • 0

I understand there are a lot of ways of encrypting an SQLConnection string so you can use it inside a VB.NET program to be able to connect to the SQL database without your connection string easily being read by people who disassembler/decompile the .exe itself.

I know this post: encrypt SQL connectionstring c#

talks about two main ways which are: Configuration Secure Section and also Enterprise Library Data Access Application Block

Now I have adapted the Configuration Secure Section where I have my connection string encrypted inside a app.config file which my program can decrypt to get the connection string. I know that this can only be decrypted on the same computer that it was encrypted on, which isn’t an issue.

My question though is how are these methods effective? Doesn’t someone just have to create a program on that computer that just uses the same practice to decrypt?

Even if I use Hashing and MD5 encryption or stuff like this, the decryption method is still inside my program that can be extracted from a Decompiler/Disassembler.

Is the only way for me to really protect my data is purchase some type of obfuscator and use that on my encryption/decryption code and hope for the best? or anyone know the best way?


What I have done is created a program that requires a username and password to login and then be able to perform SQL queries based off information that exists in the same database. I can’t use a website, it has to be done through a .NET program. This program is given out to a lot of my customers across the US. This means I really need some security behind this.

  • 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-06-10T20:00:39+00:00Added an answer on June 10, 2026 at 8:00 pm

    The truly safe way to do this is to not connect to SQL directly at all…

    Create an API/Webservice/Similar on the internet which talks to the database. Your client can then authenticate to the API and make requests.

    This gives you a number of advantages:

    • The client never knows the connection string
    • You can guarantee that the code modifying your data is under your control and unmodified
    • You can provide far finer-grained permissions based on users and roles
    • Decompiling/reverse engineering won’t reveal anything sensitive as long as you write your code well (Use the built-in authentication mechanisms, don’t roll your own)
    • Should you ever need to move SQL server, you don’t need to worry about maintaining DNS entries/etc, you can just update the connection string in your API

    (Just noticed @Blam mentioned this in comments on the OP).

    So, to give more detail…

    Take the Business-logic (or equivalent layer) and expose the methods through a webservice. as Blam suggested, WCF is a great place to start. This allows you to enforce the business logic and manage all changes to the database in code.

    Have a look here and here for help getting started with WCF

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

Sidebar

Related Questions

As I understand it there's a 2 GB limit on single instances in .NET.
There are a lot of reports of systems failing to understand the year 2010
I understand there are lots of settings for setting layouts. Here is a ListCtrl
I understand there are many for math and integers, but instead of x+=y ,
I understand there is plenty of documentation about designing for multiple screen support in
I understand there is a limit to the number of requests per day using
From what I understand there is no way of type-checking the messages send in
I understand that there is a setting in Sun JVM for dumping the heap
I don't understand why there is no inheritance in Java annotations, just as Java
Are there overall rules/guidelines for what makes a method thread-safe? I understand that there

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.