如何获得与Windows身份验证的电子邮件地址 [英] How to obtain email address with window authentication

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

问题描述

我设计采用ASP.net MVC框架的Web应用程序。我想使用Windows身份验证,并做使用角色管理器SQLRoleProvider角色检查。

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).

感谢您的帮助!

推荐答案

您可以查看用户的属性在Active Directory中。下面是说明如何做一个伟大的文章,使用的System.DirectoryServices和C#:

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.$c$cproject.com/Articles/6778/How-to-get-User-Data-from-the-Active-Directory

这篇关于如何获得与Windows身份验证的电子邮件地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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