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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T17:20:33+00:00 2026-05-19T17:20:33+00:00

Would anyone be so kind as to help me figure out how to open

  • 0

Would anyone be so kind as to help me figure out how to open a web.config file from a wpf thick client. I have a wpf form (not a silverlight app) that I would like have the ability to browse to a directory ( c:\test\web.config ) and then load custom keys from the appSettings section of the selected web.config file. Example Bind a field within my form to Path=Version

Within the web.config file Version would be identified as:

<add key="Version" value="1.0 />

Thanks in advance

  • 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-19T17:20:34+00:00Added an answer on May 19, 2026 at 5:20 pm

    I usually prefer to use one of the ConfigurationManager methods like this one:

    http://msdn.microsoft.com/en-us/library/ms224437.aspx

    Or there is the old style Xml with XPath:

    XmlDocument webConfig = new XmlDocument();
    webConfig.Load(dllConfigFileName);
    XmlNode someNode = webConfig.SelectSingleNode("//configuration/appSettings/add[@key='someKey']");
    

    Or the newer LINQ to XML:

    XDocument document = XDocument.Load(configFileFullName);
    XElement configurationElement = document.Element("configuration");
    XElement appSettingsElement = configurationElement.Element("appSettings");
    List<XElement> configSettings = new List<XElement>(appSettingsElement.Descendants("add"));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Would anyone be able to help me with how to get the file properties
I was wondering if anyone could help me out with jQuery file tree (
ok I was getting help from a kind person on this problem and would
Can anyone help me see in what kind of scenarios it would make sense
was wondering if anyone could help me out. I have been looking all over
Would anyone be able to tell me how to pull the server name out
Would anyone offer tips, links, code snippets on how to browse to a file
Would anyone happen to know a trick that will keep this MSBuild task from
can anyone help? I have created a WCF library (not application) and i will
I wonder if anyone can help. I'm writing a Spring MVC / Webflow web

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.