-
Notifications
You must be signed in to change notification settings - Fork 1.4k
AspNetUserIdentity Layout Renderer
Rolf Kristensen edited this page Jul 4, 2022
·
8 revisions
ASP.NET HttpContext User.Identity.Name
Platforms Supported: All
Similar to AUTH_USER
/ REMOTE_USER
/ LOGON_USER
in Server Variables.
${aspnet-user-identity}
Adding Identity in ASP.NET Core 2.2 using IServiceCollection
in ConfigureServices
:
services.AddIdentity<IdentityUser, IdentityRole>()
.AddRoles<IdentityRole>()
.AddDefaultTokenProviders()
.AddDefaultUI();
See also Introduction to Identity on ASP.NET Core (Configuring IdentityOptions
)
For additional details about the user identity, then one can also use ${aspnet-user-claim}
- Troubleshooting Guide - See available NLog Targets and Layouts: https://nlog-project.org/config
- Getting started
- How to use structured logging
- Troubleshooting
- FAQ
- Articles about NLog
-
All targets, layouts and layout renderers
Popular: - Using NLog with NLog.config
- Using NLog with appsettings.json