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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. App configuration file (App.config)

App configuration file (App.config)

Scheduled Pinned Locked Moved C#
questionworkspace
3 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.
  • X Offline
    X Offline
    xoph
    wrote on last edited by
    #1

    :cool:I started investigating about application configuration files. It seems that window based application can only have one config file that must reside in the application folder. This file must be named as follows: myapp.exe.config Does anybody know if it is possible to avoid the double extension .exe.config and have only .config ? (I would like to avoid double extensions files, because it may be seen as a virus) I tried to replace myapp.exe.config by myapp.config but it did not work. Any suggestions? Thanks Chris

    S 1 Reply Last reply
    0
    • X xoph

      :cool:I started investigating about application configuration files. It seems that window based application can only have one config file that must reside in the application folder. This file must be named as follows: myapp.exe.config Does anybody know if it is possible to avoid the double extension .exe.config and have only .config ? (I would like to avoid double extensions files, because it may be seen as a virus) I tried to replace myapp.exe.config by myapp.config but it did not work. Any suggestions? Thanks Chris

      S Offline
      S Offline
      Stephane Rodriguez
      wrote on last edited by
      #2

      create a new AppDomain and set the ConfigurationFile property.


      RSS feed

      X 1 Reply Last reply
      0
      • S Stephane Rodriguez

        create a new AppDomain and set the ConfigurationFile property.


        RSS feed

        X Offline
        X Offline
        xoph
        wrote on last edited by
        #3

        Thanks for suggesting creating a new AppDomain. I found out that I don't need to create a new AppDomain, I can just set the application file of the current AppDomain with the following: AppDomain.CurrentDomain.SetData("APP_CONFIG_FILE", @"C:\aaa\test.config"); :-DChris

        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