Quantcast
Channel: All Forums
Viewing all articles
Browse latest Browse all 27852

web.config versus IIS application settings

$
0
0

Call me late to the party, but I just discovered you can have Application settings stored in IIS site configuration same as in web.config.

(Tell me if I'm wrong.)

Ok, so a few questions which I could not easily Bing answers for.

Do I consume the IIS application settings in my vb.net code in the same way, usingConfigurationManager.AppSettings("<name>") ?

If I have two appSettings with the same name, one in IIS and one in web.config do they conflict or is there a precedence?

Say I want to have multiple appSettings and connectionStrings but I want them to be triggered based on the server on which the app is hosted.  Can I:

(1) Set up a IIS applicationSetting name like DeployLevel and then set it to DEV|STAGE|PROD

(2) Trigger which values to use in my web.config based on the value of DeployLevel ?


Viewing all articles
Browse latest Browse all 27852

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>