How to get the id of a windows user RRS feed

  • Question

  • User-1355245701 posted

    I would like to get the id of a logged in windows user when they call a web page. Not the machine name/username but rather the email address that they used to log in to windows. What is the use of a machine name/user name if it is not unique? The code below tries to get customer TONY-DESKTOP/Tony from the database instead of Tony@bigpond.com. Given I use Windows authentication for my website requests, why should I not be able to access the  windows logon id. There will be a huge requirement to do so.

       Protected Sub Page_Load(sender As Object, e As EventArgs)
            If Not IsPostBack Then
                Trees.tre = New Trees.Tree.Node(New Trees.Tree.Tree())
            End If
        End Sub


    Wednesday, August 17, 2016 9:48 AM


All replies