troubleshooting Question

Convert LDAP query from ASP to ASP.NET

Avatar of SWRO
SWRO asked on
ASP.NETMicrosoft Development
9 Comments1 Solution1051 ViewsLast Modified:
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))
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 9 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 9 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros