Tag - asp.net core

asp.net core

Retrieve Http client request metadata like IP address and languages in asp.net core

576 views   0 comments last modified about 8 months ago

IP Address In ASP.NET Core, Request.UserHostAddress has been removed though that attribute exists in the traditional ASP.NET applications. We can use HttpContext.Connection to retrieve the remove client IP address: var ipAddress = HttpContext.Connecti...

View detail
asp.net core

Retrieve Identity username, email and other information in ASP.NET Core

435 views   0 comments last modified about 8 months ago

The identity system in ASP.NET has evolved over time. If you are using ASP.NET Core, you probably found User property is an instance of ClaimsPrincipal in Controller or Razor views. Thus to retrieve the information, you need to utilize the claims.

View detail