Multiuser login into winforms application
        Posted  
        
            by 
                schoetbi
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by schoetbi
        
        
        
        Published on 2010-10-10T17:49:16Z
        Indexed on 
            2011/01/12
            19:54 UTC
        
        
        Read the original article
        Hit count: 456
        
Hi there,
i have a winforms app in C# that needs access control for certain forms. That means, the application is running under the same (default) user at system startup, but certain forms need to be secured, so that only certain windows users could have access to the additional functions after identifying themself with username and password. For that step windows authentication should be used.
Now the tricky part. Although the application was started under a "normal" user I would like the superusers to "login" into the special form without restarting the entiere application.
My question now is. Is this possible (i.e. create one thread with the credentials of an administrator). Or do I need to setup another appdomain for that?
Please give me a hint wather the user of a running application could be changed somehow.
Thank you.
EDIT
I replaced administrators by "certain users" since the privileged user could be just another ordinary user that is granted access to the special functionality by the configuration of the installation.
© Stack Overflow or respective owner