Multiple App.config files with ClickOnce

A

Avishay Ben-Zvi

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,
 
I

Ignacio Machin ( .NET/ C# MVP )

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
 
A

Avishay Ben-Zvi

Ignacio Machin ( .NET/ C# MVP ) said:
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.
 
R

rbDeveloper

Hi Avishay,

I'm not sure if this is your problem, but one thing that can happen is that
the app.config. and Settings.settings files can get out of sync. Usually, you
can resync them by just double-clicking the Project -> Properties ->
Settings.settings 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!
 
E

Edmund Choi

Hello -

I came across the same problem. Has anyone found a way to encrypt the app.config residing in the data directory? Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top