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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:55:30+00:00 2026-05-27T07:55:30+00:00

In my machine.config file I have the following <configuration> …. <appSettings> <add key=key value=value/>

  • 0

In my machine.config file I have the following

<configuration>
    ....
    <appSettings>
        <add key="key" value="value"/>
    </appSettings>
</configuration>

I am trying to retrieve it on an asp page by using

ConfigurationManager.AppSettings["key"];

and it returns null every time.

  • 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-27T07:55:31+00:00Added an answer on May 27, 2026 at 7:55 am

    You probably put it in the wrong machine.config. Remember that there is the same machine.config for .NET 2.0 and 3.5 as they both target CLR 2.0 (c:\Windows\Microsoft.NET\Framework\v2.0.50727\CONFIG\) and a separate machine.config for .NET 4.0 (c:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\).

    Also remember that if you are running a 64 bit OS the folders are c:\Windows\Microsoft.NET\Framework64\v2.0.50727\CONFIG\ and c:\Windows\Microsoft.NET\Framework64\v4.0.30319\CONFIG\ respectively. So make sure you have put the key in the correct machine.config that correspond to the framework version you are targeting in your ASP.NET application as well as the x86 or x64 bit.

    So you get a machine.config per CLR version and bitness (no idea if such word exists).

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

Sidebar

Related Questions

i have an edited version of a config file specific for my machine. i
I have the following gems defined in my environment.rb file: config.gem authlogic config.gem paperclip
I have an ADO.NET Managed Data Provider that is registered in machine.config in DbProviderFactory
If I put configuration settings (like membership provider) DB Connnection, etc. in the machine.config,
I have an app.Config that was created on the dev machine running Windows 7.
How do I get the path to the machine.config from a .Net application? It
My machine is little-endian (Intel byte order). I need to read a binary file
We are having problems accessing information in .net configuration files (such as app.config and
I am using the following code to open up an XML file so that
I’m a freshman on Ruby and now trying to install ruby on my machine

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.