0

In my web.config I am setting the following key

<appSettings>
    <add key="myPath" value="//mypath.com" />
</appSettings>

Later in my web.config file I would like to use this value. Is this possible?

For example I would like to use it in a redirect rewrite map that I define later similar to this:

<rewriteMap name="myRewriteMap" defaultValue="">
    <add key="live" value="{Here I want to use the key 'myPath'}"/>
    <add key="dev2" value="http://mydevpath.com"/>
</rewriteMap>
punkrockbuddyholly
  • 9,675
  • 7
  • 36
  • 69
  • 1
    did you have a look at the existing SO answers here: http://stackoverflow.com/questions/7047181/is-it-possible-to-reuse-keys-in-web-config http://stackoverflow.com/questions/603009/variables-within-app-config-web-config?lq=1 – droidbot Dec 23 '15 at 15:30
  • @droidbot I never found it during my search. Doesn't seem to be exactly the same question but the proposed duplicate of that question is a duplicate of mine. Apparently it can't really be done... – punkrockbuddyholly Dec 23 '15 at 16:21

0 Answers0