You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Possible bug in Microsoft.AspNet.WebApi 5.2.5 and onwards: HttpContext.Current.User is no longer available during the LogRequest event of HttpApplication #177
This problem was discovered when using SerilogWeb.Classic UserName enricher. When ApplicationLifecycle module emits the final log entry for a request, the user name of the authenticated user is no longer captured by the UserName enricher.
The problem first appered after updating to Microsoft.AspNet.WebApi 5.2.5 and is still in 5.2.6. The following screenshot of the logged data illustrates the problem. The only change between the 3 runs was a bump in versions of the Microsoft.AspNet.WebApi.* nuget packages.
For more information, see a related bug report at SerilogWeb.Classic project: serilog-web/classic#55