?
Solved

Embedded app.config

Posted on 2009-12-28
5
Medium Priority
?
1,550 Views
Last Modified: 2013-12-17
hi,i want to  store a simple value  to  appconfig file of my c# app and be able to update the value some times, i want to store the appconfig file  in the exe ,not in exe  file directory,or any other path.
so  if i embedded the appconfig file in  my app resources how can i use it  as appconfig file and upadate it by code ?
thx for ur time
0
Comment
Question by:shabrandi
  • 2
3 Comments
 
LVL 9

Accepted Solution

by:
magicdlf earned 1000 total points
ID: 26132156
I am afraid you can't. Actually when your program is running, I don't think any program can modify the exe file (for editing the resource).
0
 
LVL 9

Expert Comment

by:magicdlf
ID: 26132175
You can use registry instead, unless you want to move the app to other machine and the configuration is still working.
0
 
LVL 11

Assisted Solution

by:lenordiste
lenordiste earned 1000 total points
ID: 26133670
magicdlf is right, you won't be able to achieve this.
Why do you want to have your app.config inside your .exe by the way? If it's to prevent a user from editing your app.config values then you can use a local encrypted config file for instance or windows registry like magicdlf recommended.
0

Featured Post

Microsoft Certification Exam 74-409

VeeamĀ® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
High user turnover can cause old/redundant user data to consume valuable space. UserResourceCleanup was developed to address this by automatically deleting user folders when the user account is deleted.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
Suggested Courses
Course of the Month15 days, 8 hours left to enroll

850 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