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. XML / XSL
  4. app. config file

app. config file

Scheduled Pinned Locked Moved XML / XSL
helpworkspace
2 Posts 2 Posters 21 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.
  • R Offline
    R Offline
    Rekha Patel
    wrote on last edited by
    #1

    Hi! I am using windows applications and I am trying to create a application config file. I have created an app. config file thru add item and this is how it looks..     And from my code I am accessing the config file soemthing like this using System.Configuration; string path = ConfigurationSettings.AppSettings("FilePath"); I am getting this error: An unhandled exception of type 'System.Configuration.ConfigurationException' occurred in system.dll Only elements allowed I would appreciate any insight Thanks in advance

    J 1 Reply Last reply
    0
    • R Rekha Patel

      Hi! I am using windows applications and I am trying to create a application config file. I have created an app. config file thru add item and this is how it looks..     And from my code I am accessing the config file soemthing like this using System.Configuration; string path = ConfigurationSettings.AppSettings("FilePath"); I am getting this error: An unhandled exception of type 'System.Configuration.ConfigurationException' occurred in system.dll Only elements allowed I would appreciate any insight Thanks in advance

      J Offline
      J Offline
      Javmail
      wrote on last edited by
      #2

      Hi, recently had the same problem. Check your config file for invalid chars. Exeption shows the near line where the error ocurs. In my case, the error stated: "line 32", error was in line 33 Use notepad++ with "show all characters" enabled to spot on the invalid char. Cheers.

      Jaime Vasquez

      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