Reputation: 11578
SCENARIO:
A junior development team deployed a WCF service in production that is using a reference to a project (in the same solution) that is compiled as DLL. This DLL has an application settings file with the following configuration:
And the code of the settings file is:
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="DLL-NAME.Properties" GeneratedClassName="Settings">
<Profiles />
<Settings>
<Setting Name="URL-TO-CHANGE" Type="(Web Service URL)" Scope="Application">
<Value Profile="(Default)">VALUE-WE-NEED-TO-CHANGE</Value>
</Setting>
</Settings>
</SettingsFile>
QUESTION:
Is there any way to change the value (in the example, VALUE-WE-NEED-TO-CHANGE) without recompiling?
We tried making a DLL-NAME.dll.config file but it doesn't work. Also we can't use svcconfigtool because the config file is attached to the DLL, not the WCF. Related search is hard because we only found answers like "is not possible, answer is for an exe/wcf/web project, etc."
We are out of options, indeed change the hexa from the compiled file is not an option because this means a redeploy.
Thanks in advance.
Upvotes: 2
Views: 1494
Reputation: 36
No, is not posible, the best approach to make this is setting your configuration inside a Database so you won't recompile if you need change the file, or you can create your own read file method.
Upvotes: 2