Click here to Skip to main content
15,902,445 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
Hi I would like to implement below feature in my .net application.

Currently our login application works with Active Directory. Now, I have to change if the system user as administration then web application is not open login page, it automatically logged. if not administrator then we need to show login page.

Can you please advise me?

Thanks in Advance
Posted
Updated 17-May-10 20:16pm
v2

1 solution

Use WindowsPrincipal.IsInRole[^] to determin if the current user is in the admin group and display the login page accordingly
 
Share this answer
 
Comments
ntrraorao 18-May-10 0:22am    
Thank you for the reply.
Now, I can check with role. How to do Auto login now?

Can you please provide piece of code?

Thanks
[no name] 18-May-10 7:51am    
Set the web.config for Windows authentication, that will handle the auto-login. You'll need to create a security token after the non-admin users login via the form.

HireMeForYourWork and send code? I hope your potential clients see this.

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