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 6810533
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:13:01+00:00 2026-05-26T20:13:01+00:00

I have a program that periodically polls a certain folder for log files. When

  • 0

I have a program that periodically polls a certain folder for log files. When it finds a log file, it reads it, does whatever it has to, and moves on. The program that writes the log files keeps appending, not overwriting, so I store a last modified date and a bookmark line, which is wherever I got up to last time I read the file. All good so far.

Now, I want to persist my bookmark info, so that if I shut down the polling app and restart it, it doesn’t start again at the beginning of every log file. I don’t want to hassle about storing the info in the DB; a simple XML file will do. So I thought about storing the info in the app.config file.

First question is, is this a Wrong Thing To Do? Is app.config meant only to be read from, not written to at runtime? In which case, the logical answer would be simply to write a separate xml file?

Second, if it’s OK to do this: I found a nice blog post about how to make a custom config section, but it seems to screw up other parts of the app that try to read the config file using ConfigurationManager.AppSettings.Get(key), with a ConfigurationErrorsException, message = “Configuration system failed to initialize”. What to do about that?

  • 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-05-26T20:13:02+00:00Added an answer on May 26, 2026 at 8:13 pm

    I’d store this as a separate file from the app.config – it doesn’t seem like configuration data to me. You could use Xml Serialization, Yaml, Json, or even (please, god, no) binary serialization, and either store it alongside the exe (if you have write permissions there) or somewhere from the Environment.SpecialFolder enumeration.

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

Sidebar

Related Questions

Suppose I have a program running that periodically adds information to a .CSV file.
I have program that has a variable that should never change. However, somehow, it
I have a program that detects when certain machines are online and creates a
I need to program a Background process that would periodically buffer certain types of
I have a program that continually polls the database for change in value of
I have a program that needs to store data values and periodically get the
I have a winform program that does some asynchronous IO on a SerialPort .
I have a clojure program that at some point executes a function called db-rebuild-files-table
As part of my web application I have a program that runs periodically during
We have a VB.NET program that needs to periodically call a function in an

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.