troubleshooting Question

Get Current Logged on User Username

Avatar of aqunix
aqunix asked on
ASP.NET
17 Comments1 Solution1965 ViewsLast Modified:
I am new to ASP.NET  , but I am an Expert in ASP classic

I am developing and ASP application that integrates with Active Directory.

I am stuck at a point:

- I have an Active Directory Machine , Lets Say ( MyDomain )
- And I have a Web server on a different Machine.
- and I have a stand alone client Machine Logged in using an Active Directory Account.


I need the Following :
Once I load a page it will get my Current Login Name , since I am already logged in. and search in Active Directory.

Then it will give me my Full Name.

------------------------------------------

I have tried the Request.ServerVariables("LOGON_USER") where it returns nothing.

------------------------------------------

- I have Cleard the Check Box in the IIS for the Anonymous user
- I have made sure that the Integrated Windows Authentication is checked.

But when I try to view the site , it is asking me to Enter a user name & Password. [ I DO NOT WANT TO ENTER MY USERNAME & PASSWORD AGAIN ]

and Also this can be solved by Entering the site in the Local Intranet trusted Zone in the Internet Explorer.
But also I don't want this too.

--------------------------------------------

I have read some articles on the web that this senario can be done using the Web.Config file.

-------------------------------------------

What I am planning to do is : use One Page to get the username , then the Full Name from the Active Directory using ASP.NET.

Then I will load these valuse in a Session Variable

after that I will continue my ASP Classic Application.

any URGENT HELP & REPLY is highly apreciated.
ASKER CERTIFIED SOLUTION
Nightman
CTO

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 17 Comments.
Start Free Trial
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 17 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