Solved

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

Posted on 2009-07-13
3
427 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

Raise the IQ of Your IT Alerts

From IT major incidents to manufacturing line slowdowns, every business process generates insights that need to reach the people required to take action. You need a platform that integrates with your business tools to create fully enabled DevOps toolchains.

You need xMatters.

Question has a verified solution.

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

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…

717 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