Avatar of endrec
endrec

asked on 

ASP.NET/VB.net Equivalent to the Old VBScript Request.ServerVariables("LOGON_USER")

Is there an ASP.NET platform (in VB.NET or C#,. VB preference) equivalent to the old Request.ServerVariables("LOGON_USER")  that was used to obtain NT Usernames (used in an intranet environment)?
ASP.NETVisual Basic.NET

Avatar of undefined
Last Comment
codeclay
Avatar of mem99999
mem99999
Flag of Saudi Arabia image

ASKER CERTIFIED SOLUTION
Avatar of codeclay
codeclay
Flag of India image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of raterus
raterus
Flag of United States of America image

Context.User.Identity.Name
Avatar of endrec
endrec

ASKER

Codeclay's solution works!  How would I store this Request.ServerVariables("LOGON_USER") as another session variable (the domain may be stripped eventually) called NTUsername?
Avatar of codeclay
codeclay
Flag of India image

C#
Session["NTUsername"]= Request.ServerVariables[LOGON_USER"];
VB.NET
Session("NTUsername")= Request.ServerVariables("LOGON_USER")
?
ASP.NET
ASP.NET

The successor to Active Server Pages, ASP.NET websites utilize the .NET framework to produce dynamic, data and content-driven web applications and services. ASP.NET code can be written using any .NET supported language. As of 2009, ASP.NET can also apply the Model-View-Controller (MVC) pattern to web applications

128K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo