?
Solved

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

Posted on 2009-07-13
3
Medium Priority
?
432 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 2000 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Suggested Courses

800 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