如何实现自动登录 [英] How to implement AutoLogin

查看:140
本文介绍了如何实现自动登录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨 我想在.net应用程序中实现以下功能.

当前,我们的登录应用程序可与Active Directory一起使用.现在,我必须更改如果系统用户作为管理员,那么Web应用程序未打开登录页面,它将自动登录.如果不是管理员,那么我们需要显示登录页面.

你能告诉我吗?

在此先感谢

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

推荐答案

使用 WindowsPrincipal.IsInRole [ ^ ]确定如果当前用户在admin组中,并相应地显示登录页面
Use WindowsPrincipal.IsInRole[^] to determin if the current user is in the admin group and display the login page accordingly


这篇关于如何实现自动登录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆