Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9048461
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T12:09:44+00:00 2026-06-16T12:09:44+00:00

I am using HttpContext.Current.User.Identity.Name to get the user name of the logged in user.

  • 0

I am using HttpContext.Current.User.Identity.Name to get the user name of the logged in user. I would like to know how this is working (using NTLM v2 / Kerberos) and how secure is it? Can the user try to mimic he is someone else?

Basically, from a security point of view, is there something I should be worried about, or how should I improve it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T12:09:46+00:00Added an answer on June 16, 2026 at 12:09 pm

    If you are authenticating using Windows authentication (which, given your mention of NTLM/Kerberos it appears you are) then what happens is (roughly) as follows

    • IE sends a request with no authentication header to your web server.
    • IIS refuses the request with a 401 response code and tells the browser the authentication scheme it wants (in this case Negotiate, which tries Kerberos first, and then falls back to NTLM)
    • The kerb handshake takes place over multiple connections, and the ticket is validated against AD
    • IIS passes the ticket down to ASP.NET which, in the process of building the Request object populates the principal on the thread assigned to the request with the identity details from the ticket.
    • When you access HttpContext.User you see the principal for the current thread.

    It’s secure. It’s basically the same authentication type used when you connect to a Windows server via file shares or anything else that is using kerberos. It’s actually IIS and Windows itself doing the vast majority of the work, ASP.NET is just giving you a nice way to query the results.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm in a ASP.NET application using Windows Authentication. I'm using HttpContext.Current.User.Identity.Name to get the
For an ASP.NET MVC 2 application, we are using HttpContext.User.Identity.Name to get the user
In aspx.net, what is the difference between Context.User.Identity.Name and HttpContext.Current.User.Identity.Name Im currently using the
HttpContext.Current.User.Identity.Name returns null after LogOn. I am using IIS7.0 framework 4.0. and vs 2010.
I am using windows Authentication and accessing user name as. IIdentity winId = HttpContext.Current.User.Identity;
I am receiving a null exception every time I try to send the HttpContext.Current.User.Identity.Name
I know that you can get the username of the currently logged in user
Im running a long process using ProgressBox, and in that process im using System.Web.HttpContext.Current.Server.MapPath()
I want to check the login name of a user using windows authentication. I
I am using this line of code to get the username that the computer

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.