Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Machine.Config

Machine.Config

Scheduled Pinned Locked Moved Visual Basic
csharpasp-netcomquestiondiscussion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jason Weibel
    wrote on last edited by
    #1

    Is the machine.config file only available to Asp.Net applications? I am working on a console app and have added a setting to the file, but it isn't pulling using ConfigurationSettings.AppSettings("KeyName").ToString. I would appreciate any thoughts on this. Thank you. Jason W.

    D 1 Reply Last reply
    0
    • J Jason Weibel

      Is the machine.config file only available to Asp.Net applications? I am working on a console app and have added a setting to the file, but it isn't pulling using ConfigurationSettings.AppSettings("KeyName").ToString. I would appreciate any thoughts on this. Thank you. Jason W.

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      No it's not. ConfigurationSettings.AppSettings() does not look in the machine.config file anyway. It will look in the applications config file, which should have the same name as the .EXE file with ".config" appended to it. For example, if your application's .EXE is called MyApp.exe, the corresponding configuration file will be called MyApp.exe.config and reside in the same directory as the .EXE. This is the only file AppSettings will look in. You can find more on these files on MSDN here: Machine Configuration Files[^] Application Configuration Files[^] RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups