Solved

VS 2008 -- DEPLOY -- Hide ".config" file ?

Posted on 2009-07-13
3
425 Views
Last Modified: 2013-12-17
How can I
 1. get just the "PV.exe" Desktop icon to display
     when doing the below, instead of also displaying
     the "PV.exe.config" DESKTOP icon ?
 2. hide the C:\Program Files\PVAPP\PV.exe.config
    "config" file from users so they cannot see
     the database connection string ?
------------------------------------------------------------
Deploying APP
 1. rightClick "Solution", Add, New Project
 2. Other Project Types, Setup and Deploy, Setup Wizard
 3. Name = anything
 4. Check below
     ** Localized Resources from ...
     ** Content Files from ...
     ** Primary Output from ...
 5. Finish
 6. RightClick "User Desktop"
     ** Add, Project Output, OK
 7. RightClick "User Programs Menu"
     ** Add, Project Output, OK
 8. RightClick on new PROJECT, Build
 9. run "...\Release\PVAPP.msi" on client
10. Desktop ICONs display
        ** PV.exe & PV.exe.config
11. run APP
12. works
0
Comment
Question by:finance_teacher
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 21

Expert Comment

by:Craig Wagner
ID: 24843882
I don't know what is causing the config file to show up as an icon, but as far as protecting your configuration file connection strings, encrypting them is probably a better choice than trying to hide the file, because no matter how you try to hide the file a determined user can still find it.

Here's a simple way to encrypt the sensitive information.

1. Rename the applications configuration file to web.config.

2. If encryption of the connection strings section is required, execute the following command to encrypt the connectionStrings section:

    aspnet_regiis -pef connectionStrings <install folder>

3. If encryption of the application settings section is required, execute the following command to encrypt the appSettings section:

    aspnet_regiis -pef appSettings <install folder>

4. Rename the file back to the correct name (i.e. <name-of-executable>.config).
0
 

Author Comment

by:finance_teacher
ID: 24844141
This is a non-web "Windows APP".
Would I still use "aspnet_regiis -..." ?
0
 
LVL 21

Accepted Solution

by:
Craig Wagner earned 500 total points
ID: 24844169
Yes. The .NET framework does not provide a simple way to encrypt the app.config, so we fake it into thinking it's a web.config (that's why the first step of the instructions is to rename the application's config file to web.config).
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question