Click here to Skip to main content
15,887,676 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi to all!

i create an application whose security module is when the user is in domain can use the application

if the user is not in domain

he can switch user

how can i switch user programitacially without closing the application
Posted

Try to impersonate the new user in case you know the credentials , else ask for the credentials from a dialog then impersonate
Take a look at this Windows Impersonation using C#[^]
 
Share this answer
 
v2
hello kami124.

The question is not clear. You want to change the users of your Application Or windows users??
 
Share this answer
 
Comments
kami124 15-Aug-11 6:22am    
windows user
Though above both is good answer.
here is one application which supports the functionality
Login, Switchuser and Logoff just try it.

Hop it will help you
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900