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. C#
  4. DLL Config File

DLL Config File

Scheduled Pinned Locked Moved C#
helpquestion
5 Posts 3 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
    jklucker
    wrote on last edited by
    #1

    I have a DLL I wrote that uses a web service. I set the 'Web Reference URL' to dynamic. I see in the app.config file that the value is present. My problem is when I compile the DLL the config file is not generated. Question #1: Is this normal behavior for a DLL. Question #2: Could copy and rename the app.config file to '.dll.config' and the DLL use it normally? Any help would be greatly appreciated! Thanks in advance! I reject to reality and subsitute my own! - Adam Savage, Mythbuster life is like a roll of toilet paper. The closer it gets to the end, the faster it goes.

    D 1 Reply Last reply
    0
    • J jklucker

      I have a DLL I wrote that uses a web service. I set the 'Web Reference URL' to dynamic. I see in the app.config file that the value is present. My problem is when I compile the DLL the config file is not generated. Question #1: Is this normal behavior for a DLL. Question #2: Could copy and rename the app.config file to '.dll.config' and the DLL use it normally? Any help would be greatly appreciated! Thanks in advance! I reject to reality and subsitute my own! - Adam Savage, Mythbuster life is like a roll of toilet paper. The closer it gets to the end, the faster it goes.

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

      There are no config files for .DLL's like there are for applications (app.config.) Any settings code you write would be looking at the host application's config file, whatever that may be. And your signature should be fixed:

      I reject your reality and substitute my own

      RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

      J 1 Reply Last reply
      0
      • D Dave Kreskowiak

        There are no config files for .DLL's like there are for applications (app.config.) Any settings code you write would be looking at the host application's config file, whatever that may be. And your signature should be fixed:

        I reject your reality and substitute my own

        RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

        J Offline
        J Offline
        jklucker
        wrote on last edited by
        #3

        Dave Kreskowiak wrote: Any settings code you write would be looking at the host application's config file, whatever that may be. I thought that to, but it doesn't seem to be true. So I guess the only true way of doing this would be to modify the Web Reference source file and modify it's constructor to require the URL to the web service. The only problem with this solution would be when you update the web reference then this file would be recreated and the changes would be lost. As for my signature, the quote is correct as stated. Pay close attention to the opening of Mythbusters.

        D 1 Reply Last reply
        0
        • J jklucker

          Dave Kreskowiak wrote: Any settings code you write would be looking at the host application's config file, whatever that may be. I thought that to, but it doesn't seem to be true. So I guess the only true way of doing this would be to modify the Web Reference source file and modify it's constructor to require the URL to the web service. The only problem with this solution would be when you update the web reference then this file would be recreated and the changes would be lost. As for my signature, the quote is correct as stated. Pay close attention to the opening of Mythbusters.

          D Offline
          D Offline
          DavidNohejl
          wrote on last edited by
          #4

          Why don't you have your own .config XML file, and access it like XML file not like config file? e.g. with XPath document... or am I missing something badly??? :confused: (I admit I more read that sig/quote part :-O) jklucker wrote: As for my signature, the quote is correct as stated. Pay close attention to the opening of Mythbusters. Yeah you won[^] Looks like you are both wrong, guys... ;P Dave with quote and you because you misspelled word "substitute" ;P;P David Never forget: "Stay kul and happy" (I.A.)
          David's thoughts / dnhsoftware.org / MyHTMLTidy

          J 1 Reply Last reply
          0
          • D DavidNohejl

            Why don't you have your own .config XML file, and access it like XML file not like config file? e.g. with XPath document... or am I missing something badly??? :confused: (I admit I more read that sig/quote part :-O) jklucker wrote: As for my signature, the quote is correct as stated. Pay close attention to the opening of Mythbusters. Yeah you won[^] Looks like you are both wrong, guys... ;P Dave with quote and you because you misspelled word "substitute" ;P;P David Never forget: "Stay kul and happy" (I.A.)
            David's thoughts / dnhsoftware.org / MyHTMLTidy

            J Offline
            J Offline
            jklucker
            wrote on last edited by
            #5

            You are right I can create my own config file and access like XML. I was looking to use the app.config functionality that System.Configuration.AppSettings gives us access to. I like the google fight, I never heard that before. I'll have to remember that. It just goes to show how spell checkers are relied upon.:-> I reject to reality and subsitute my own! - Adam Savage, Mythbuster life is like a roll of toilet paper. The closer it gets to the end, the faster it goes.

            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