Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Hiding or Securing Connection String

Hiding or Securing Connection String

Scheduled Pinned Locked Moved C#
csharpc++visual-studiosysadminquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Christopher Stratmann
    wrote on last edited by
    #1

    I would like to securely hide a connection string from anyone trying to break my C# assembly. I know I cannot just stick my connection string within my C# assembly because the use of Reflection would reveal it. Even through an Obfuscator the connection string can be somewhat hidden but not very securely. Putting the connection string in the app.config file and having Visual Studio automatically encrypt it is still not very secure in my eyes. I was thinking about storing it within a C++ unmanaged dll to prevent the use of reflection but I dont know if that is secure and also how do would I stop someone else from using that C++ unmanaged dll? Has anyone found a good method out there that can be totally secure without using third party software and without using a web server? Chris

    V E 2 Replies Last reply
    0
    • C Christopher Stratmann

      I would like to securely hide a connection string from anyone trying to break my C# assembly. I know I cannot just stick my connection string within my C# assembly because the use of Reflection would reveal it. Even through an Obfuscator the connection string can be somewhat hidden but not very securely. Putting the connection string in the app.config file and having Visual Studio automatically encrypt it is still not very secure in my eyes. I was thinking about storing it within a C++ unmanaged dll to prevent the use of reflection but I dont know if that is secure and also how do would I stop someone else from using that C++ unmanaged dll? Has anyone found a good method out there that can be totally secure without using third party software and without using a web server? Chris

      V Offline
      V Offline
      Vasudevan Deepak Kumar
      wrote on last edited by
      #2

      Check this out http://www.codeproject.com/aspnet/secure_connectionstrings.asp[^]

      Vasudevan Deepak Kumar Personal Homepage
      Tech Gossips
      Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.

      1 Reply Last reply
      0
      • C Christopher Stratmann

        I would like to securely hide a connection string from anyone trying to break my C# assembly. I know I cannot just stick my connection string within my C# assembly because the use of Reflection would reveal it. Even through an Obfuscator the connection string can be somewhat hidden but not very securely. Putting the connection string in the app.config file and having Visual Studio automatically encrypt it is still not very secure in my eyes. I was thinking about storing it within a C++ unmanaged dll to prevent the use of reflection but I dont know if that is secure and also how do would I stop someone else from using that C++ unmanaged dll? Has anyone found a good method out there that can be totally secure without using third party software and without using a web server? Chris

        E Offline
        E Offline
        Ennis Ray Lynch Jr
        wrote on last edited by
        #3

        For actual security you would need a password to be entered on application startup allowing you to use the System.Security.Cryptography namespace's cryptography classes.


        Need a C# Consultant? I'm available.
        Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups