Answer the question
In order to leave comments, you need to log in
How to display the username when the application is published on the server?
An ASP.NET application, when run locally, displays the username of the logged in user. If this application is published on the server, displays the name of the application pool. How to display username? I already changed the settings on IIS.
Answer the question
In order to leave comments, you need to log in
Fix it.
https://docs.microsoft.com/en-us/previous-versions...
Although it's best to create a new app and play around with it
Without code, it's hard to say what you're doing wrong, and in the comments you don't answer all clarifying questions.
From what I understand, you incorrectly determine the authorized user.
You are using a method that determines the user under which the application is running on the system.
To determine the name of the domain user who visited the site, you need to use Identity and Windows auth.
Since the question does not indicate which aspnet, then here is the instruction for Core:
https://docs.microsoft.com/en-us/aspnet/core/secur...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question