如何通过窗口认证获取电子邮件地址 [英] How to obtain email address with window authentication
问题描述
如何确定当前登录用户的电子邮件地址?这是否可以实现?
应用程序将部署在多域内联网中,如果重要(我认为这样做)。
感谢任何帮助!
您可以查看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屋!