I use the following code on an ASP page and it works fine. However, I need to upgrade the page to ASP.NET (VB.NET) and this doesn't work. I get the Set and Let no longer supported error message.
What's the ASP.NET equivalent of this?
strUser= Replace(Request.ServerVariables("LOGON_USER"), "\", "/")
On Error Resume Next
Set xUser = GetObject("WinNT://" & strUser & ",user")
usrUserName = xUser.Name
usrFullname = xUser.Fullname
nameArray = Split(usrFullname, " ", -1, 1)
usrFirstName = nameArray(LBound(nameArray))
usrLastName = nameArray(UBound(nameArray))