0

Is it possible to move the WCF Service contract to a separate configuration XML file, so that they can be modified on production, without having the need for redeployment.

To be specific, it is possible to move this code from .cs file to some other .xml file, which will allow me to modify the contract, post deployment.

[ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Multiple, InstanceContextMode = InstanceContextMode.Single, UseSynchronizationContext = false)]

Note: This is for a WinForms(Desktop) application.

  • 1
    Possible duplicate of [Use XML includes or config references in app.config to include other config files' settings](https://stackoverflow.com/questions/480538/use-xml-includes-or-config-references-in-app-config-to-include-other-config-file) – Camilo Terevinto Jul 19 '17 at 12:17
  • Thanks, but my question is different. Please see the edit. – Ankit Gupta Jul 19 '17 at 12:28
  • https://stackoverflow.com/questions/2813975/can-i-split-system-servicemodel-into-a-separate-config-file – William Xifaras Jul 19 '17 at 13:25
  • Don't do this, it isn't a good idea. – Ben Jul 19 '17 at 14:07
  • You can do this, but you will have to write a custom extension to do so. See [here](https://stackoverflow.com/a/5787557/745969) and [here](https://stackoverflow.com/a/37946709/745969). Then you could use the `configSource` attribute in the `` element of the application's config file to point to the config file that contains the extension info. But that's a lot of work.... – Tim Jul 19 '17 at 16:16

0 Answers0