如何通过窗口认证获取电子邮件地址 [英] How to obtain email address with window authentication

查看:193
本文介绍了如何通过窗口认证获取电子邮件地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用ASP.net MVC框架设计一个Web应用程序。我想使用Windows身份验证,并使用角色管理器SQLRoleProvider执行角色检查。



如何确定当前登录用户的电子邮件地址?这是否可以实现?



应用程序将部署在多域内联网中,如果重要(我认为这样做)。



感谢任何帮助!

解决方案

您可以查看Active Directory中的用户属性。这是一篇很棒的文章,解释如何使用System.DirectoryServices和C#:



http://www.codeproject.com/Articles/6778/How-to-get-User-Data -from-the-Active-Directory


I am designing a web application using the ASP.net MVC framework. I would like to use Windows Authentication and do Role Checks using the Role Manager SQLRoleProvider.

How can I determine the email address of the current logged on user? Is this even possible?

The application will be deployed in a multi-domain intranet, if that matters (which I assume it does).

Thanks for any help!

解决方案

You can look up the user's properties in Active Directory. Here is a great article that explains how to do that using System.DirectoryServices and C#:

http://www.codeproject.com/Articles/6778/How-to-get-User-Data-from-the-Active-Directory

这篇关于如何通过窗口认证获取电子邮件地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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