Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Retrieve Network Login

Status
Not open for further replies.

davepruce

Programmer
Dec 18, 2001
17
0
0
GB
Hi
Anyone know how to retrieve the Network Login currently active on the workstation?
I've been working in ASP for the last few years and its easy, how do you find it in VB.Net?
Cheers
Dave
 
Solved it thanks to a Tek Tip I found here suggesting WindowsIdentity.GetCurrent, then a websearch found me --------------------------------------------------------
'WindowsIdentity.vb


Imports System
Imports System.Security.Principal


Module WindowsIdentityExample
Public Sub Main()
Dim CurIdentity As WindowsIdentity
CurIdentity = WindowsIdentity.GetCurrent()
End Sub
End Module
------------------------------------------------------
Hope this helps someone else
Dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top