Note that there are some explanatory texts on larger screens.

plurals
  1. POForcing WCF to ignore config file, or sections of config file
    primarykey
    data
    text
    <p>I understand how to configure WCF programatically, but I'm wondering if there's a way to force a WCF service to always ignore the configuration file and/or to ignore parts of the configuration file.</p> <p>I'd like to be able to restrict a service to using certain settings, such as ensuring it will only use a specific binding configuration whilst leaving some binding settings such as the address configurable. This means I have two options I can 1) Restrict specific settings as required if possible, or 2) Disable loading of the config file altogether and use my own custom config file that supports only the settings I need and use these as the basis on which to setup the bindings programatically based on these values.</p> <p>I understand that with a self-hosted service I can at least iterate the binding settings and so forth and disable/remove/modify those I am not interested in after they have been loaded but I believe this is only trivial for self-hosted services where you set up ServiceHost manually and I'm wondering if it's the only way to restrict configuration especially as I believe that having made the service do this there is nothing to stop someone taking the service library itself and using a different host (such as IIS) to load it with their own custom configuration.</p> <p>I understand that the whole point of WCF is that it's highly configurable and flexible and that this goes against this fundamental design goal of it somewhat so agree it's not an ideal scenario but this isn't a requirement I have had any input over so any suggestions as to how it may be possible to limit configuration options as discussed above would be appreciated.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload