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
  1. Home
  2. General Programming
  3. Visual Basic
  4. Encrypt App.config

Encrypt App.config

Scheduled Pinned Locked Moved Visual Basic
securitycollaborationhelpquestion
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.
  • D Offline
    D Offline
    Dinesh Vitharana
    wrote on last edited by
    #1

    Hi All, I am using Enteprise Library Data Access Application Block (v 3.0 April 2007) in my application.I want to encrypt the App.config file. I have tried the bulit-in RSA and Data encryption metods in Data Access Application block. It seemed that the user account who creates the encryption key only has the key to decrypt it. That means it's machine dependant. Eg. If i encrypt the config file in my machine my collegue can't decrypt it in his machine. Is there any way that we can encrypt the file using a public key which is accessible to the other developers in the team? Can anybody suggest me a way to overcome this issue? Thanx in advance, Dinesh

    D J 2 Replies Last reply
    0
    • D Dinesh Vitharana

      Hi All, I am using Enteprise Library Data Access Application Block (v 3.0 April 2007) in my application.I want to encrypt the App.config file. I have tried the bulit-in RSA and Data encryption metods in Data Access Application block. It seemed that the user account who creates the encryption key only has the key to decrypt it. That means it's machine dependant. Eg. If i encrypt the config file in my machine my collegue can't decrypt it in his machine. Is there any way that we can encrypt the file using a public key which is accessible to the other developers in the team? Can anybody suggest me a way to overcome this issue? Thanx in advance, Dinesh

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      The way I've gotten around this is to not ship an encrypted app.config. You encrypt the app.config using a custom action in the installer project. This encrypts the app.config file when the application is installed on the target machine.

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
           2006, 2007, 2008

      1 Reply Last reply
      0
      • D Dinesh Vitharana

        Hi All, I am using Enteprise Library Data Access Application Block (v 3.0 April 2007) in my application.I want to encrypt the App.config file. I have tried the bulit-in RSA and Data encryption metods in Data Access Application block. It seemed that the user account who creates the encryption key only has the key to decrypt it. That means it's machine dependant. Eg. If i encrypt the config file in my machine my collegue can't decrypt it in his machine. Is there any way that we can encrypt the file using a public key which is accessible to the other developers in the team? Can anybody suggest me a way to overcome this issue? Thanx in advance, Dinesh

        J Offline
        J Offline
        Jon_Boy
        wrote on last edited by
        #3

        I end up creating my own encryption routine to encrypt the data prior to getting written to the config. The key is skewed and the code is obfuscated for better protection; our apps are used by our internal employees only.

        Any suggestions, ideas, or 'constructive criticism' are always welcome. "There's no such thing as a stupid question, only stupid people." - Mr. Garrison

        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