Set a server variable that multiple dotnet apps can use? RRS feed

  • Question

  • User-1657171777 posted

    I have a handful of dotnet mvc applications that all share a single variable.  It's an IP address that each app uses for LDAP auth.  I would like to move this variable out from each application and make it available globally from the server.  I need to do this because the IP address changes a few times a year, and I don't want to go through each project to update this value.  It would be nice to update it in one place without any further hassle.

    So what are my options?  My apps are all hosted in IIS on a Win 2012 server.  I thought there should be some way to set a custom variable in IIS, but I couldn't find any place to do that.  And if there is a place to set a global variable, how do I retrieve it in my applications?


    Friday, February 23, 2018 8:30 PM

All replies

  • User475983607 posted

    Is there any reason why you don't store the variable in a database?

    Friday, February 23, 2018 8:33 PM