Get current user's email address in .NET

前端 未结 4 1539
面向向阳花
面向向阳花 2021-02-02 07:24

I would like to know the email address of the user (assuming she\'s in a typical Windows office network). This is in a C# application. Perhaps something to the effect of

4条回答
  •  北恋
    北恋 (楼主)
    2021-02-02 07:52

    If you're behind a Windows domain, you could always grab their email address out of Active Directory.

    Here's an example: http://lozanotek.com/blog/articles/149.aspx

提交回复
热议问题