Configuration locking



Hi,

in an application I'm using a non trivial configuration,
implemented with classes from the System.Configuration namespace.
The parameters will be written to the app.exe.config file.
My application is stored on a network device and can be used from
more than one user at the same time.
To prevent the parameters for competing access, I want to lock
the parameters during one user is editing these parameters.

The ConfigurationElement class has lock functionality: ConfigurationElement.LockItem.
But I can't find any background informations about the locking mechanism.

Does anyone works with the locking mechanism?
I have a few questions about this:

1. Can I use LockItem for multi user locking?
2. How can I get the information which user is locking the parameters at the moment?
3. How can I manually unlock the parameters if a lock is lost?
4. How does it work?
5. Is there a better way for configuration locking?

Regards
Ralf

.



Relevant Pages

  • Re: Configuration locking
    ... The lock works quite a bit like a lock on a thread, only there is far less information you can get from it. ... If the values you are looking at are routinely changed, they would be better in a persistant store than a configuration file. ... But I can't find any background informations about the locking mechanism. ...
    (microsoft.public.dotnet.framework)
  • Interoperation of flock(2), fcntl(2), and lockf(3)
    ... Does that mean that each of those calls uses a locking mechanism ... error (it's a no-op case of upgrading the lock,) intermixing flock ...
    (freebsd-arch)
  • Interoperation of flock(2), fcntl(2), and lockf(3)
    ... Does that mean that each of those calls uses a locking mechanism ... error (it's a no-op case of upgrading the lock,) intermixing flock ...
    (freebsd-hackers)
  • XP User Account Configuration
    ... Is is possible to configure the start menu in a way, lock ... and assign that configuration to a group of users? ... Locking it, i mean denying future access to start menu ...
    (microsoft.public.windowsxp.security_admin)
  • Re: Synchronized Collection Recommendation
    ... All this locking will however slow things down for such things as ... Which will now lock every time it reads something, ... Thread A increments i to the last element ... used it just seems like one cannot reliably choose the locking mechanism ...
    (microsoft.public.dotnet.languages.csharp)