I have a Core class lib which has all my logic inside.
I have a Web Application that uses IIS.
I have a Console Application that uses Http Listener.
Both host projects reference the Core lib that has a connectionStringSource.config file in it.
The hosts projects have used Add As Link to the connectionStringSource.config in Core and set to Copy To Output. In the web.config in the IIS host project it has
<connectionStrings configSource="bin\connectionStringSource.config"></connectionStrings>
However I get:
[ArgumentException: Illegal characters in path.]
[ConfigurationErrorsException: The configSource attribute is invalid.: Illegal characters in path. (line 13)]
If I change to
<connectionStrings configSource="bin/connectionStringSource.config"></connectionStrings>
It says
The configSource attribute must be a relative physical path, so the '/' character is not allowed.
Is there a way to share these settings?
I have followed the suggestions here and here but they don't seem to work.