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

  • Home
  • SEARCH
  • 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 592115
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T15:42:20+00:00 2026-05-13T15:42:20+00:00

When creating a Configuration object, it asks for a path to a config file…

  • 0

When creating a Configuration object, it asks for a path to a config file… I keep getting an exception thrown for an invalid file path… What’s a valid path? I’ve tried “config.config” and “.\config.config”, but I can’t think of anything else.

  • 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-13T15:42:20+00:00Added an answer on May 13, 2026 at 3:42 pm

    If this is for accessing your app.config file, you can use System.Configuration.ConfigurationManager static class, i.e.

    var setting = System.Configuration.ConfigurationManager.AppSettings["MySetting"];
    

    Edit: You probably want something like this then:

    var configuration = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); // choose ConfigurationUserLevel value, or provide @"c:\path\to\some\exe\"
    configuration.AppSettings.Settings.Add("test", "value"); // for new configs
    configuration.AppSettings.Settings["test2"].Value = "somevalue"; // for modification of existing keys
    c.Save(); // or choose save location
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

While creating a file synchronization program in C# I tried to make a method
I have my validation configuration stored in validation.config in my Business Object project. The
I'd like to have a single configuration file and then when I'm creating a
I'm creating a log shipping configuration between two sql server 2005 instances. I'm shipping
I am creating a framework in PHP and need to have a few configuration
Creating an XPathDocument with referenced DTD sometimes throws a web exception. Why?
When creating a web application, and lets say you have a User object denoting
When creating my application's or library's configuration, I generally prefer using a custom configuration
I'm creating an email message using CDO object (and VB6, but that doesn't really
The following for creating a Global Object is resulting in compilation errors. #include stdafx.h

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.