Click here to Skip to main content
15,559,455 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello All,

I'm working in windows 7 environment and C# dot net to authenticate windows credentials,
Please help me to authenticate user is administrator or not.
I have to check these credentials at login page and grant access if user is administrator.
Authentication on local machine is needed.

I've found this method but I don't want to check domain name
LogonUser(userName, domain, password, 2, 0, ref tokenHandler);

Updated 12-Aug-13 22:20pm

1 solution

Share this answer
ridoy 13-Aug-13 4:08am    
Mehdi Gholam 13-Aug-13 4:16am    
Thanks ridoy!
KIDYA 13-Aug-13 4:41am    
Thanks for reply Mehdi.If I have to check it with local machine then?

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