Multiple App.config files with ClickOnce

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?QXZpc2hheSBCZW4tWnZp?=

    Multiple App.config files with ClickOnce

    Hi,

    I have an application that I am encrypting the connection strings on the
    first run of the application. I am using clickonce to deploy the
    application, so this was a good solution as the application is immediately
    run and the config file is encrypted immediately. How ever, when the
    application is deployed a second directory with "_none_" in the name is
    created and the app.config is copied there too.The app.config in the _none_
    folder has none encrypted connection string.

    So I have 2 questions:
    1. Why do I have duplicate app.config?
    2. Why the connection string in the app.config that is in the _none_folder
    is not encrypted?

    Thanks for you time,


  • Ignacio Machin ( .NET/ C# MVP )

    #2
    Re: Multiple App.config files with ClickOnce

    On Jun 24, 8:37 am, Avishay Ben-Zvi <avis...@commun ity.nospamwrote :
    Hi,
    >
    I have an application that I am encrypting the connection strings on the
    first run of the application.  I am using clickonce to deploy the
    application, so this was a good solution as the application is immediately
    run and the config file is encrypted immediately.  How ever, when the
    application is deployed a second directory with "_none_" in the name is
    created and the app.config is copied there too.The app.config in the _none_
    folder has none encrypted connection string.
    I honestly suggest you to find another solution, your current solution
    is not that safe to start with.
    Could you give more details about your escenario

    Comment

    • =?Utf-8?B?QXZpc2hheSBCZW4tWnZp?=

      #3
      Re: Multiple App.config files with ClickOnce



      "Ignacio Machin ( .NET/ C# MVP )" wrote:
      On Jun 24, 8:37 am, Avishay Ben-Zvi <avis...@commun ity.nospamwrote :
      Hi,

      I have an application that I am encrypting the connection strings on the
      first run of the application. I am using clickonce to deploy the
      application, so this was a good solution as the application is immediately
      run and the config file is encrypted immediately. How ever, when the
      application is deployed a second directory with "_none_" in the name is
      created and the app.config is copied there too.The app.config in the _none_
      folder has none encrypted connection string.
      >
      I honestly suggest you to find another solution, your current solution
      is not that safe to start with.
      Could you give more details about your escenario
      >

      Hi ,

      First of all thanks for your time.

      Here is the senario details:
      1. Build a windows Application.
      2. Add an app.config file.
      3. Use Clickonce to deploy the application.

      In the deployed location you will find 2 folder containing the app.config.
      One with the encrypted conection string and an other folder named
      something_none_ something with an app.cofig that is not encrypted.

      Again thanks for your time.

      Comment

      • =?Utf-8?B?cmJEZXZlbG9wZXI=?=

        #4
        Re: Multiple App.config files with ClickOnce

        Hi Avishay,

        I'm not sure if this is your problem, but one thing that can happen is that
        the app.config. and Settings.settin gs files can get out of sync. Usually, you
        can resync them by just double-clicking the Project -Properties ->
        Settings.settin gs file. Letting these files get out of sync can really be
        tough to figure out with Click-Once. Just open both files with an editor and
        verify each node has the same value in both files.

        Click-Once is great, but there are scenarios where it just doesn't work.
        Personally, I found the following book really helpful:

        Smart Client Deployment with ClickOnce by Brian Noyes

        Hope that helps!



        "Avishay Ben-Zvi" wrote:
        >
        >
        "Ignacio Machin ( .NET/ C# MVP )" wrote:
        >
        On Jun 24, 8:37 am, Avishay Ben-Zvi <avis...@commun ity.nospamwrote :
        Hi,
        >
        I have an application that I am encrypting the connection strings on the
        first run of the application. I am using clickonce to deploy the
        application, so this was a good solution as the application is immediately
        run and the config file is encrypted immediately. How ever, when the
        application is deployed a second directory with "_none_" in the name is
        created and the app.config is copied there too.The app.config in the _none_
        folder has none encrypted connection string.
        I honestly suggest you to find another solution, your current solution
        is not that safe to start with.
        Could you give more details about your escenario
        >
        >
        Hi ,
        >
        First of all thanks for your time.
        >
        Here is the senario details:
        1. Build a windows Application.
        2. Add an app.config file.
        3. Use Clickonce to deploy the application.
        >
        In the deployed location you will find 2 folder containing the app.config.
        One with the encrypted conection string and an other folder named
        something_none_ something with an app.cofig that is not encrypted.
        >
        Again thanks for your time.
        >

        Comment

        Working...