Using your own class is a smart option. You can also use the settings of the VS designer if you want.
The VS constructor saves property settings in the ApplicationSettingsBase class. By default, these properties are serialized / deserialized into an XML file for each user. Since there is no user context for the WCF service, this will not work. You can override this behavior using the special SettingsProvider , which makes it easy to save properties where you want. Just add the SettingsProvider attribute to the SettingsProvider generated VS class:
[SettingsProvider(typeof(CustomSettingsProvider))] internal sealed partial class Settings { ... }
A good example of this is RegistrySettingsProvider .
Edit: My initial reading of your question showed that you were asking how to save the settings in the WCF service. Now I see that you want to pass the settings through WCF. You can also use the SettingsProvider class for this purpose.
source share