Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8814713
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T04:11:54+00:00 2026-06-14T04:11:54+00:00

I need to have a common application settings file and i need it to

  • 0

I need to have a common application settings file and i need it to be editable by the application at runtime.

I don’t want to use the build in settings operation by putting “User” in settings scope because it gets saved in users local directory.

On the other hand i cant use the .config with “Application” as i cannot save into this file from within the application.

One might say “Create your own save settings XML file its easy”..Yes probably it is but i wonder what is the solution for a common writable config file with MS build in classes?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T04:11:56+00:00Added an answer on June 14, 2026 at 4:11 am

    To have data, whatever the format, updateable by all users then all users need to be able to save to whatever container holds that data.

    This applies whatever the format, from text file to RDBMS.

    The problem with a file that you manage (eg. .config (XML) file) is twofold:

    1. Concurrency.
    2. Access Control.

    The ConfigurationManager and associated classes will write to a .exe.config file with applicable declaration of the configuration elements and properties, but the underlying file has to be writeable. You’ll need to:

    1. Set an ACL in an installer so all (applicable) users have write access. This means outside the application they can write as well, this is unavoidable as there is no ability to set access control based on application.

    2. Install outside Program Files. UAC virtualises writes to Program Files (so applications assuming all users can write anywhere don’t break), but this also means it cannot be used for shared modifiable data.

    Concurrency is another problem. What is two users both modify the shared data together? One user will overwrite the others changes unless you implement some locking and reloading on changed.

    Consider using a multi-user database for the data instead. They are designed for this kind of thing, Config files are not.


    Update (based on comment):

    To have a (non-admin) user update a .exe.config in Program Files will still hit UAC virtualisation (ie. any writes will be directed to a per-user location, and not-visible to anyone else).

    Easier to use the ConfigurationManager.OpenExeConfiguration(string) method to load a .config from some shared location (eg. in C:\ProgramData1) which has an appropriate ACL. The returned Configuration object has all the capabilities of the implicit load from .exe.config for <appSettings> as well as custom sections, plus access to Save and SaveAs.


    1 Of course using correct methods to get actual local path, not hardcoding.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have 2 Java EE applications which need to share some common user related
We have common views that we use in our application in many locations inside
I have common functionality that I need to access from all screens of my
I have what must surely be a fairly common documentation need... I'm implementing a
I have a common database class for my application and in that class i
I need to know where and how application settings (connections string) could be stored
I need to have an instance of one common object in every other object,
For my document-based application I want to have a list of Recent Documents, as
I have a common problem in my application where I extract functionality into classes
I have an installable ASP.Net application that is logging using Common.Logging. When writing log

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.