3

As an example, let us say that I have an application with multiple users and multiple administrators. I want the administrators to be able to configure sitewide session timeouts. The code would check the settings for what the configured timeout is,and implement accordingly.

Is the ConfigurationManager class appropriate for this, or is there something else? From what I read, I would need to use User rather than Application settings, because Application settings are readonly. However, I dont want the ability for multiple user settings - just one settings.

EDIT: This is one single web application.

2
  • Is this one application (a single instance of a web app)? Multiple web applications (one for this client, one for that client...)? Multiple deployed applications (one or more desktop applications)?
    – user40980
    May 25 '15 at 1:42
  • I just looked at this, but it seems a bit more convoluted than necessary? talksharp.com/…
    – appsecguy
    May 25 '15 at 14:46
1

ConfigurationManager is used to access the hierarchy of '.config' (machine, app and user) available to .NET applications. Modifying some values in some of these files may require some form of service restart, pool recycle or even a machine restart to get picked up.

Assuming you've already got code in place that can set the values you want, it sounds like you simply need to store this information wherever you store other data (your database for example) and simply have an administrator only page to modify the values.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.