Solved

Getting Windows Login UserId

Posted on 2011-03-03
2
230 Views
Last Modified: 2012-05-11
Building an app that will reside within our network on the Intranet.  In the old ASP days I could get the UserId of the logged in user by calling Request.ServerVariables("LOGON_USER").  Is there an equivalent within a web app using C#?
0
Comment
Question by:jmpatton
2 Comments
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 500 total points
ID: 35027737
The same thing is still valid, just the syntax is slightly different:
string user = Request.ServerVariables["LOGON_USER"];

Open in new window

0
 

Author Closing Comment

by:jmpatton
ID: 35027802
Thanks for the quick replies and the help today
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

28 Experts available now in Live!

Get 1:1 Help Now