We are running a asp.net mvc application (client - this app is accessed through browser by user) which makes use of HttpClient
class to make calls to asp.net web api
application (server- I want to access the user information user. Person who invoked the client application). This is a intranet application. We are hosting asp.net web api as windows service. How can I get the user name in this scenario?
ApiController
class has a property public IPrincipal User { get; }
. I looked this property and this is what i got:
User.Identity.AuthenticationType = ""; User.Identity.IsAuthenticated = false; User.Identity.Name = ""
Is it possible to get some valid value from User.Identity
with this kind of setup?
asp.net mvc application
. this application uses windows authentication & later this application usingHttpClient
class makes calls to asp.net web api application. I want the user name to be available @ asp.net web api side (server side ) without making use toHttpClient
class to post that information. I dont know if i can achieve this.