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

  • Home
  • SEARCH
  • 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 1032099
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T14:01:54+00:00 2026-05-16T14:01:54+00:00

I am developing an asp.net application with Windows authentication. User.Identity.Name seems to return the

  • 0

I am developing an asp.net application with Windows authentication. User.Identity.Name seems to return the logged in user in the form MACHINENAME\USERNAME.

I would like to use this to access a database of user specific settings but what happens if the user logs on from a different machine, then the MACHINENAME part will be different. So can I simply take the USERNAME part and ignore the MACHINENAME part? Is the format of User.Identity.Name always MACHINENAME\USERNAME for Windows authentication?

Thanks,

AJ

  • 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-05-16T14:01:55+00:00Added an answer on May 16, 2026 at 2:01 pm

    More specifically, User.Identity.Name returns in the format [Domain]\[User]

    If your users are showing up as different domains when they access from different machines, then they are in fact different user accounts. You may be able to strip out the [Domain] part, but that means that if anybody on a machine (domain) connects as a user with the same name as a user on a different machine (domain) then the system won’t be able to tell them apart. This may be “fine, for now” in your scenario, but it’s definitely not good practice.

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

Sidebar

Related Questions

I am developing an ASP.Net application that will need to verify that the user
I am developing a web application with Azure Cloude Service and using ASP.NET 3.5,
I am developing the asp.net mobile application. I am generating the controls dynamically at
The ASP.NET web application I am developing needs to support two different types of
I'm developing an ASP.NET MVC multi site application (can host multiple sites from the
I need to estimate (and probably build later on) complex filter in ASP.NET WebForms
Usually I would look at writing a Windows Service to manage tasks that aren't
I recently created an MVC2 application. I am having trouble bringing it up on
I know how to access the iSeries using VB.NET. I use an OLE DB

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.