- Notifications
You must be signed in to change notification settings - Fork1.4k
Getting started with ASP.NET Core 6
ℹ️ See alsoexample in GitHub
This tutorial is for ASP.NET Core 6.
- For ASP.NET Core 3.1, checkGetting started with ASP.NET Core 3.1
In Visual Studio 2022. Version 17.0+ is needed
Install the latest:
- NLog.Web.AspNetCore v5+
- Update theNLog package if possible
in csproj:
<ItemGroup> <PackageReferenceInclude="NLog.Web.AspNetCore"Version="5.*" /> <PackageReferenceInclude="NLog"Version="5.*" /></ItemGroup>
Create nlog.config (lowercase all) file in the root of your project.
We use this example:
<?xml version="1.0" encoding="utf-8" ?><nlogxmlns="http://www.nlog-project.org/schemas/NLog.xsd"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://www.nlog-project.org/schemas/NLog.xsd"autoReload="true"throwConfigExceptions="true"internalLogLevel="Info"internalLogFile="c:\temp\internal-nlog-AspNetCore.txt"><!-- enable asp.net core layout renderers--> <extensions> <addassembly="NLog.Web.AspNetCore"/> </extensions><!-- the targets to write to--> <targets><!-- File Target for all log messages with basic details--> <targetxsi:type="File"name="allfile"fileName="c:\temp\nlog-AspNetCore-all-${shortdate}.log"layout="${longdate}|${event-properties:item=EventId:whenEmpty=0}|${level:uppercase=true}|${logger}|${message} ${exception:format=tostring}" /><!-- File Target for own log messages with extra web details using some ASP.NET core renderers--> <targetxsi:type="File"name="ownFile-web"fileName="c:\temp\nlog-AspNetCore-own-${shortdate}.log"layout="${longdate}|${event-properties:item=EventId:whenEmpty=0}|${level:uppercase=true}|${logger}|${message} ${exception:format=tostring}|url: ${aspnet-request-url}|action: ${aspnet-mvc-action}" /><!--Console Target for hosting lifetime messages to improve Docker / Visual Studio startup detection--> <targetxsi:type="Console"name="lifetimeConsole"layout="${MicrosoftConsoleLayout}" /> </targets><!-- rules to map from logger name to target--> <rules><!-- All logs, including from Microsoft--> <loggername="*"minlevel="Trace"writeTo="allfile" /><!-- Suppress output from Microsoft framework when non-critical--> <loggername="System.*"finalMinLevel="Warn" /> <loggername="Microsoft.*"finalMinLevel="Warn" /><!-- Keep output from Microsoft.Hosting.Lifetime to console for fast startup detection--> <loggername="Microsoft.Hosting.Lifetime*"finalMinLevel="Info"writeTo="lifetimeConsole" /> <loggername="*"minlevel="Trace"writeTo="ownFile-web" /> </rules></nlog>
More details of the config file arehere.
It is also possible to have the NLog-configuration in theappsettings.json-file. Then one doesn't need to maintain an additional XML-configuration file.
Notice that one might have to pay special attention to theHosting Lifetime Startup Messages, if removing all other LoggingProviders (like Console) and only using NLog. As it can cause hosting environments (Visual Studio / Docker / Azure Container) to not see an application as started.
Update the program.cs to includeUseNLog()
usingNLog;usingNLog.Web;// Early init of NLog to allow startup and exception logging, before host is builtvarlogger=NLog.LogManager.Setup().LoadConfigurationFromAppSettings().GetCurrentClassLogger();logger.Debug("init main");try{varbuilder=WebApplication.CreateBuilder(args);// Add services to the container.builder.Services.AddControllersWithViews();// NLog: Setup NLog for Dependency injectionbuilder.Logging.ClearProviders();builder.Host.UseNLog();varapp=builder.Build();// Configure the HTTP request pipeline.if(!app.Environment.IsDevelopment()){app.UseExceptionHandler("/Home/Error");// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.app.UseHsts();}app.UseHttpsRedirection();app.UseStaticFiles();app.UseRouting();app.UseAuthorization();app.MapControllerRoute(name:"default",pattern:"{controller=Home}/{action=Index}/{id?}");app.Run();}catch(Exceptionexception){// NLog: catch setup errorslogger.Error(exception,"Stopped program because of exception");throw;}finally{// Ensure to flush and stop internal timers/threads before application-exit (Avoid segmentation fault on Linux)NLog.LogManager.Shutdown();}
The Microsoft Logging filters specified inappsettings.json are ignored by default when using NLog 5.0. Just make sure that NLog configuration rules are configured correctly usingfinalMinLevel:
<rules> <loggername="System.*"finalMinLevel="Warn" /> <loggername="Microsoft.*"finalMinLevel="Warn" /> <loggername="Microsoft.Hosting.Lifetime*"finalMinLevel="Info" /> <loggername="*"minlevel="Trace"writeTo="ownFile-web" /></rules>
It is possible to configure NLog LoggingProvider to obey the Microsoft filters specified inappsettings.json-file, by specifyingRemoveLoggerFactoryFilter = false when callingUseNLog(...). Notice it is also possible to have theNLog configuration in the appsettings.json.
{"Logging": {"LogLevel": {"Default":"Trace","Microsoft":"Warning","Microsoft.Hosting.Lifetime":"Information" },"NLog": {"RemoveLoggerFactoryFilter":true } },"AllowedHosts":"*"}Remember to also update any environment specific configuration to avoid any surprises. Exappsettings.Development.json
Inject the ILogger in your controller:
usingMicrosoft.Extensions.Logging;publicclassHomeController:Controller{privatereadonlyILogger<HomeController>_logger;publicHomeController(ILogger<HomeController>logger){_logger=logger;_logger.LogDebug(1,"NLog injected into HomeController");}publicIActionResultIndex(){_logger.LogInformation("Hello, this is the index!");returnView();}}
When starting the ASP.NET Core website, we get two files:
2021-12-01 12:14:49.3964|14|INFO|Microsoft.Hosting.Lifetime|Now listening on: https://localhost:7125 |url: |action: 2021-12-01 12:14:49.3964|14|INFO|Microsoft.Hosting.Lifetime|Now listening on: http://localhost:5125 |url: |action: 2021-12-01 12:14:49.4099|0|INFO|Microsoft.Hosting.Lifetime|Application started. Press Ctrl+C to shut down. |url: |action: 2021-12-01 12:14:49.4099|0|INFO|Microsoft.Hosting.Lifetime|Hosting environment: Development |url: |action: 2021-12-01 12:14:49.4099|0|INFO|Microsoft.Hosting.Lifetime|Content root path: D:\Repos\NLog.Web\examples\ASP.NET Core 6\ASP.NET Core 6 NLog Example\ |url: |action: 2021-12-01 12:14:49.8186|1|DEBUG|ASP.NetCore6_NLog_Web_Example.Controllers.HomeController|NLog injected into HomeController |url: https://localhost/|action: Index2021-12-01 12:14:49.8186|0|INFO|ASP.NetCore6_NLog_Web_Example.Controllers.HomeController|Hello, this is the index! |url: https://localhost/|action: Index2021-12-01 12:15:17.3318|0|INFO|Microsoft.Hosting.Lifetime|Application is shutting down... |url: |action:2021-12-01 12:14:49.2894|3|DEBUG|Microsoft.AspNetCore.Mvc.Razor.Compilation.DefaultViewCompiler|Initializing Razor view compiler with compiled view: '/Views/Home/Index.cshtml'. 2021-12-01 12:14:49.2894|3|DEBUG|Microsoft.AspNetCore.Mvc.Razor.Compilation.DefaultViewCompiler|Initializing Razor view compiler with compiled view: '/Views/Home/Privacy.cshtml'. 2021-12-01 12:14:49.2894|3|DEBUG|Microsoft.AspNetCore.Mvc.Razor.Compilation.DefaultViewCompiler|Initializing Razor view compiler with compiled view: '/Views/Shared/Error.cshtml'. 2021-12-01 12:14:49.2894|3|DEBUG|Microsoft.AspNetCore.Mvc.Razor.Compilation.DefaultViewCompiler|Initializing Razor view compiler with compiled view: '/Views/Shared/_ValidationScriptsPartial.cshtml'. 2021-12-01 12:14:49.2894|3|DEBUG|Microsoft.AspNetCore.Mvc.Razor.Compilation.DefaultViewCompiler|Initializing Razor view compiler with compiled view: '/Views/_ViewImports.cshtml'. 2021-12-01 12:14:49.2894|3|DEBUG|Microsoft.AspNetCore.Mvc.Razor.Compilation.DefaultViewCompiler|Initializing Razor view compiler with compiled view: '/Views/_ViewStart.cshtml'. 2021-12-01 12:14:49.2894|3|DEBUG|Microsoft.AspNetCore.Mvc.Razor.Compilation.DefaultViewCompiler|Initializing Razor view compiler with compiled view: '/Views/Shared/_Layout.cshtml'. 2021-12-01 12:14:49.3077|12|DEBUG|Microsoft.AspNetCore.Mvc.ModelBinding.ModelBinderFactory|Registered model binder providers, in the following order: Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BinderTypeModelBinderProvider, Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ServicesModelBinderProvider, Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinderProvider, Microsoft.AspNetCore.Mvc.ModelBinding.Binders.HeaderModelBinderProvider, Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FloatingPointTypeModelBinderProvider, Microsoft.AspNetCore.Mvc.ModelBinding.Binders.EnumTypeModelBinderProvider, Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DateTimeModelBinderProvider, Microsoft.AspNetCore.Mvc.ModelBinding.Binders.SimpleTypeModelBinderProvider, Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CancellationTokenModelBinderProvider, Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ByteArrayModelBinderProvider, Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FormFileModelBinderProvider, Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FormCollectionModelBinderProvider, Microsoft.AspNetCore.Mvc.ModelBinding.Binders.KeyValuePairModelBinderProvider, Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DictionaryModelBinderProvider, Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ArrayModelBinderProvider, Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinderProvider, Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ComplexObjectModelBinderProvider 2021-12-01 12:14:49.3249|1|DEBUG|Microsoft.Extensions.Hosting.Internal.Host|Hosting starting 2021-12-01 12:14:49.3371|18|DEBUG|Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager|Found key {5c77ea3d-6e0e-4864-a74e-dca1cb89e170}. 2021-12-01 12:14:49.3371|18|DEBUG|Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager|Found key {b2651ec8-a2b0-4fc9-b6f1-2f6971a82883}. 2021-12-01 12:14:49.3371|13|DEBUG|Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver|Considering key {5c77ea3d-6e0e-4864-a74e-dca1cb89e170} with expiration date 2026-02-27 11:09:48Z as default key. 2021-12-01 12:14:49.3371|0|DEBUG|Microsoft.AspNetCore.DataProtection.TypeForwardingActivator|Forwarded activator type request from Microsoft.AspNetCore.DataProtection.XmlEncryption.DpapiXmlDecryptor, Microsoft.AspNetCore.DataProtection, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.XmlEncryption.DpapiXmlDecryptor, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 2021-12-01 12:14:49.3371|51|DEBUG|Microsoft.AspNetCore.DataProtection.XmlEncryption.DpapiXmlDecryptor|Decrypting secret element using Windows DPAPI. 2021-12-01 12:14:49.3371|0|DEBUG|Microsoft.AspNetCore.DataProtection.TypeForwardingActivator|Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60 2021-12-01 12:14:49.3371|4|DEBUG|Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.CngCbcAuthenticatedEncryptorFactory|Opening CNG algorithm 'AES' from provider '(null)' with chaining mode CBC. 2021-12-01 12:14:49.3507|3|DEBUG|Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.CngCbcAuthenticatedEncryptorFactory|Opening CNG algorithm 'SHA256' from provider '(null)' with HMAC. 2021-12-01 12:14:49.3507|2|DEBUG|Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider|Using key {5c77ea3d-6e0e-4864-a74e-dca1cb89e170} as the default key. 2021-12-01 12:14:49.3507|65|DEBUG|Microsoft.AspNetCore.DataProtection.Internal.DataProtectionHostedService|Key ring with default key {5c77ea3d-6e0e-4864-a74e-dca1cb89e170} was loaded during application startup. 2021-12-01 12:14:49.3507|0|DEBUG|Microsoft.AspNetCore.Watch.BrowserRefresh.BlazorWasmHotReloadMiddleware|Middleware loaded 2021-12-01 12:14:49.3507|0|DEBUG|Microsoft.AspNetCore.Watch.BrowserRefresh.BrowserScriptMiddleware|Middleware loaded. Script /_framework/aspnetcore-browser-refresh.js (16539 B). 2021-12-01 12:14:49.3507|0|DEBUG|Microsoft.AspNetCore.Watch.BrowserRefresh.BrowserScriptMiddleware|Middleware loaded. Script /_framework/blazor-hotreload.js (799 B). 2021-12-01 12:14:49.3507|0|DEBUG|Microsoft.AspNetCore.Watch.BrowserRefresh.BrowserRefreshMiddleware|Middleware loaded: DOTNET_MODIFIABLE_ASSEMBLIES=debug, __ASPNETCORE_BROWSER_TOOLS=true 2021-12-01 12:14:49.3825|0|DEBUG|Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer|Using development certificate: CN=localhost (Thumbprint: C3C32FDC7F4CFE5EC387602BC1FF687AD02FE3FC) 2021-12-01 12:14:49.3964|14|INFO|Microsoft.Hosting.Lifetime|Now listening on: https://localhost:7125 2021-12-01 12:14:49.3964|14|INFO|Microsoft.Hosting.Lifetime|Now listening on: http://localhost:5125 2021-12-01 12:14:49.3964|13|DEBUG|Microsoft.AspNetCore.Hosting.Diagnostics|Loaded hosting startup assembly ASP.NetCore6_NLog_Web_Example 2021-12-01 12:14:49.3964|13|DEBUG|Microsoft.AspNetCore.Hosting.Diagnostics|Loaded hosting startup assembly Microsoft.AspNetCore.Watch.BrowserRefresh 2021-12-01 12:14:49.3964|13|DEBUG|Microsoft.AspNetCore.Hosting.Diagnostics|Loaded hosting startup assembly Microsoft.WebTools.ApiEndpointDiscovery 2021-12-01 12:14:49.3964|13|DEBUG|Microsoft.AspNetCore.Hosting.Diagnostics|Loaded hosting startup assembly Microsoft.WebTools.BrowserLink.Net 2021-12-01 12:14:49.4099|0|INFO|Microsoft.Hosting.Lifetime|Application started. Press Ctrl+C to shut down. 2021-12-01 12:14:49.4099|0|INFO|Microsoft.Hosting.Lifetime|Hosting environment: Development 2021-12-01 12:14:49.4099|0|INFO|Microsoft.Hosting.Lifetime|Content root path: D:\Repos\NLog.Web\examples\ASP.NET Core 6\ASP.NET Core 6 NLog Example\ 2021-12-01 12:14:49.4099|2|DEBUG|Microsoft.Extensions.Hosting.Internal.Host|Hosting started 2021-12-01 12:14:49.5951|39|DEBUG|Microsoft.AspNetCore.Server.Kestrel.Connections|Connection id "0HNHF721G7VDL" accepted. 2021-12-01 12:14:49.5951|39|DEBUG|Microsoft.AspNetCore.Server.Kestrel.Connections|Connection id "0HNHF721G7VDM" accepted. 2021-12-01 12:14:49.5951|1|DEBUG|Microsoft.AspNetCore.Server.Kestrel.Connections|Connection id "0HNHF721G7VDM" started. 2021-12-01 12:14:49.5951|1|DEBUG|Microsoft.AspNetCore.Server.Kestrel.Connections|Connection id "0HNHF721G7VDL" started. 2021-12-01 12:14:49.6058|6|DEBUG|Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets|Connection id "0HNHF721G7VDL" received FIN. 2021-12-01 12:14:49.6058|6|DEBUG|Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets|Connection id "0HNHF721G7VDM" received FIN. 2021-12-01 12:14:49.6058|2|DEBUG|Microsoft.AspNetCore.Server.Kestrel.Connections|Connection id "0HNHF721G7VDL" stopped. 2021-12-01 12:14:49.6058|2|DEBUG|Microsoft.AspNetCore.Server.Kestrel.Connections|Connection id "0HNHF721G7VDM" stopped. 2021-12-01 12:14:49.6058|7|DEBUG|Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets|Connection id "0HNHF721G7VDL" sending FIN because: "The Socket transport's send loop completed gracefully." 2021-12-01 12:14:49.6058|7|DEBUG|Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets|Connection id "0HNHF721G7VDM" sending FIN because: "The Socket transport's send loop completed gracefully." 2021-12-01 12:14:49.6612|39|DEBUG|Microsoft.AspNetCore.Server.Kestrel.Connections|Connection id "0HNHF721G7VDN" accepted. 2021-12-01 12:14:49.6612|1|DEBUG|Microsoft.AspNetCore.Server.Kestrel.Connections|Connection id "0HNHF721G7VDN" started. 2021-12-01 12:14:49.6828|3|DEBUG|Microsoft.AspNetCore.Server.Kestrel.Https.Internal.HttpsConnectionMiddleware|Connection 0HNHF721G7VDN established using the following protocol: Tls12 2021-12-01 12:14:49.6945|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending SETTINGS frame for stream ID 0 with length 18 and flags NONE. 2021-12-01 12:14:49.6945|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending WINDOW_UPDATE frame for stream ID 0 with length 4 and flags 0x0. 2021-12-01 12:14:49.6945|37|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" received SETTINGS frame for stream ID 0 with length 24 and flags NONE. 2021-12-01 12:14:49.6945|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending SETTINGS frame for stream ID 0 with length 0 and flags ACK. 2021-12-01 12:14:49.6945|37|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" received WINDOW_UPDATE frame for stream ID 0 with length 4 and flags 0x0. 2021-12-01 12:14:49.6945|37|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" received HEADERS frame for stream ID 1 with length 471 and flags END_STREAM, END_HEADERS, PRIORITY. 2021-12-01 12:14:49.7106|37|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" received SETTINGS frame for stream ID 0 with length 0 and flags ACK. 2021-12-01 12:14:49.7106|1|INFO|Microsoft.AspNetCore.Hosting.Diagnostics|Request starting HTTP/2 GET https://localhost:7125/ - - 2021-12-01 12:14:49.7930|0|DEBUG|Microsoft.AspNetCore.HostFiltering.HostFilteringMiddleware|Wildcard detected, all requests with hosts will be allowed. 2021-12-01 12:14:49.7930|2|TRACE|Microsoft.AspNetCore.HostFiltering.HostFilteringMiddleware|All hosts are allowed. 2021-12-01 12:14:49.7930|4|DEBUG|Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware|The request path / does not match a supported file type 2021-12-01 12:14:49.7930|1001|DEBUG|Microsoft.AspNetCore.Routing.Matching.DfaMatcher|1 candidate(s) found for the request path '/' 2021-12-01 12:14:49.8033|1005|DEBUG|Microsoft.AspNetCore.Routing.Matching.DfaMatcher|Endpoint 'ASP.NetCore6_NLog_Web_Example.Controllers.HomeController.Index (ASP.NetCore6_NLog_Web_Example)' with route pattern '{controller=Home}/{action=Index}/{id?}' is valid for the request path '/' 2021-12-01 12:14:49.8033|1|DEBUG|Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware|Request matched endpoint 'ASP.NetCore6_NLog_Web_Example.Controllers.HomeController.Index (ASP.NetCore6_NLog_Web_Example)' 2021-12-01 12:14:49.8033|0|INFO|Microsoft.AspNetCore.Routing.EndpointMiddleware|Executing endpoint 'ASP.NetCore6_NLog_Web_Example.Controllers.HomeController.Index (ASP.NetCore6_NLog_Web_Example)' 2021-12-01 12:14:49.8033|3|INFO|Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker|Route matched with {action = "Index", controller = "Home"}. Executing controller action with signature Microsoft.AspNetCore.Mvc.IActionResult Index() on controller ASP.NetCore6_NLog_Web_Example.Controllers.HomeController (ASP.NetCore6_NLog_Web_Example). 2021-12-01 12:14:49.8033|1|DEBUG|Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker|Execution plan of authorization filters (in the following order): None 2021-12-01 12:14:49.8033|1|DEBUG|Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker|Execution plan of resource filters (in the following order): Microsoft.AspNetCore.Mvc.ViewFeatures.Filters.SaveTempDataFilter 2021-12-01 12:14:49.8033|1|DEBUG|Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker|Execution plan of action filters (in the following order): Microsoft.AspNetCore.Mvc.Filters.ControllerActionFilter (Order: -2147483648), Microsoft.AspNetCore.Mvc.ModelBinding.UnsupportedContentTypeFilter (Order: -3000) 2021-12-01 12:14:49.8033|1|DEBUG|Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker|Execution plan of exception filters (in the following order): None 2021-12-01 12:14:49.8033|1|DEBUG|Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker|Execution plan of result filters (in the following order): Microsoft.AspNetCore.Mvc.ViewFeatures.Filters.SaveTempDataFilter 2021-12-01 12:14:49.8033|2|TRACE|Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker|Resource Filter: Before executing OnResourceExecuting on filter Microsoft.AspNetCore.Mvc.ViewFeatures.Filters.SaveTempDataFilter. 2021-12-01 12:14:49.8033|3|TRACE|Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker|Resource Filter: After executing OnResourceExecuting on filter Microsoft.AspNetCore.Mvc.ViewFeatures.Filters.SaveTempDataFilter. 2021-12-01 12:14:49.8186|1|DEBUG|Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker|Executing controller factory for controller ASP.NetCore6_NLog_Web_Example.Controllers.HomeController (ASP.NetCore6_NLog_Web_Example) 2021-12-01 12:14:49.8186|1|DEBUG|ASP.NetCore6_NLog_Web_Example.Controllers.HomeController|NLog injected into HomeController 2021-12-01 12:14:49.8186|2|DEBUG|Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker|Executed controller factory for controller ASP.NetCore6_NLog_Web_Example.Controllers.HomeController (ASP.NetCore6_NLog_Web_Example) 2021-12-01 12:14:49.8186|2|TRACE|Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker|Action Filter: Before executing OnActionExecutionAsync on filter Microsoft.AspNetCore.Mvc.Filters.ControllerActionFilter. 2021-12-01 12:14:49.8186|2|TRACE|Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker|Action Filter: Before executing OnActionExecuting on filter Microsoft.AspNetCore.Mvc.ModelBinding.UnsupportedContentTypeFilter. 2021-12-01 12:14:49.8186|3|TRACE|Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker|Action Filter: After executing OnActionExecuting on filter Microsoft.AspNetCore.Mvc.ModelBinding.UnsupportedContentTypeFilter. 2021-12-01 12:14:49.8186|1|INFO|Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker|Executing action method ASP.NetCore6_NLog_Web_Example.Controllers.HomeController.Index (ASP.NetCore6_NLog_Web_Example) - Validation state: Valid 2021-12-01 12:14:49.8186|0|INFO|ASP.NetCore6_NLog_Web_Example.Controllers.HomeController|Hello, this is the index! 2021-12-01 12:14:49.8186|2|INFO|Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker|Executed action method ASP.NetCore6_NLog_Web_Example.Controllers.HomeController.Index (ASP.NetCore6_NLog_Web_Example), returned result Microsoft.AspNetCore.Mvc.ViewResult in 0.3062ms. 2021-12-01 12:14:49.8186|2|TRACE|Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker|Action Filter: Before executing OnActionExecuted on filter Microsoft.AspNetCore.Mvc.ModelBinding.UnsupportedContentTypeFilter. 2021-12-01 12:14:49.8186|3|TRACE|Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker|Action Filter: After executing OnActionExecuted on filter Microsoft.AspNetCore.Mvc.ModelBinding.UnsupportedContentTypeFilter. 2021-12-01 12:14:49.8186|3|TRACE|Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker|Action Filter: After executing OnActionExecutionAsync on filter Microsoft.AspNetCore.Mvc.Filters.ControllerActionFilter. 2021-12-01 12:14:49.8186|2|TRACE|Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker|Result Filter: Before executing OnResultExecuting on filter Microsoft.AspNetCore.Mvc.ViewFeatures.Filters.SaveTempDataFilter. 2021-12-01 12:14:49.8186|3|TRACE|Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker|Result Filter: After executing OnResultExecuting on filter Microsoft.AspNetCore.Mvc.ViewFeatures.Filters.SaveTempDataFilter. 2021-12-01 12:14:49.8186|4|TRACE|Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker|Before executing action result Microsoft.AspNetCore.Mvc.ViewResult. 2021-12-01 12:14:49.8186|1|DEBUG|Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine|View lookup cache miss for view 'Index' in controller 'Home'. 2021-12-01 12:14:49.8186|5|TRACE|Microsoft.AspNetCore.Mvc.Razor.Compilation.DefaultViewCompiler|Located compiled view for view at path '/Views/Home/Index.cshtml'. 2021-12-01 12:14:49.8186|7|TRACE|Microsoft.AspNetCore.Mvc.Razor.Compilation.DefaultViewCompiler|Could not find a file for view at path '/Views/Home/_ViewStart.cshtml'. 2021-12-01 12:14:49.8186|5|TRACE|Microsoft.AspNetCore.Mvc.Razor.Compilation.DefaultViewCompiler|Located compiled view for view at path '/Views/_ViewStart.cshtml'. 2021-12-01 12:14:49.8186|7|TRACE|Microsoft.AspNetCore.Mvc.Razor.Compilation.DefaultViewCompiler|Could not find a file for view at path '/_ViewStart.cshtml'. 2021-12-01 12:14:49.8186|1|INFO|Microsoft.AspNetCore.Mvc.ViewFeatures.ViewResultExecutor|Executing ViewResult, running view Index. 2021-12-01 12:14:49.8186|2|DEBUG|Microsoft.AspNetCore.Mvc.ViewFeatures.ViewResultExecutor|The view path '/Views/Home/Index.cshtml' was found in 3.0541ms. 2021-12-01 12:14:49.8429|1|DEBUG|Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine|View lookup cache miss for view '_Layout' in controller 'Home'. 2021-12-01 12:14:49.8429|7|TRACE|Microsoft.AspNetCore.Mvc.Razor.Compilation.DefaultViewCompiler|Could not find a file for view at path '/Views/Home/_Layout.cshtml'. 2021-12-01 12:14:49.8429|5|TRACE|Microsoft.AspNetCore.Mvc.Razor.Compilation.DefaultViewCompiler|Located compiled view for view at path '/Views/Shared/_Layout.cshtml'. 2021-12-01 12:14:49.8692|100|DEBUG|Microsoft.AspNetCore.Routing.DefaultLinkGenerator|Found the endpoints Route: {controller=Home}/{action=Index}/{id?} for address Microsoft.AspNetCore.Routing.RouteValuesAddress 2021-12-01 12:14:49.8692|102|DEBUG|Microsoft.AspNetCore.Routing.DefaultLinkGenerator|Successfully processed template {controller=Home}/{action=Index}/{id?} for Route: {controller=Home}/{action=Index}/{id?} resulting in and 2021-12-01 12:14:49.8692|105|DEBUG|Microsoft.AspNetCore.Routing.DefaultLinkGenerator|Link generation succeeded for endpoints Route: {controller=Home}/{action=Index}/{id?} with result / 2021-12-01 12:14:49.8692|100|DEBUG|Microsoft.AspNetCore.Routing.DefaultLinkGenerator|Found the endpoints Route: {controller=Home}/{action=Index}/{id?} for address Microsoft.AspNetCore.Routing.RouteValuesAddress 2021-12-01 12:14:49.8692|102|DEBUG|Microsoft.AspNetCore.Routing.DefaultLinkGenerator|Successfully processed template {controller=Home}/{action=Index}/{id?} for Route: {controller=Home}/{action=Index}/{id?} resulting in and 2021-12-01 12:14:49.8692|105|DEBUG|Microsoft.AspNetCore.Routing.DefaultLinkGenerator|Link generation succeeded for endpoints Route: {controller=Home}/{action=Index}/{id?} with result / 2021-12-01 12:14:49.8692|100|DEBUG|Microsoft.AspNetCore.Routing.DefaultLinkGenerator|Found the endpoints Route: {controller=Home}/{action=Index}/{id?} for address Microsoft.AspNetCore.Routing.RouteValuesAddress 2021-12-01 12:14:49.8692|102|DEBUG|Microsoft.AspNetCore.Routing.DefaultLinkGenerator|Successfully processed template {controller=Home}/{action=Index}/{id?} for Route: {controller=Home}/{action=Index}/{id?} resulting in /Home/Privacy and 2021-12-01 12:14:49.8692|105|DEBUG|Microsoft.AspNetCore.Routing.DefaultLinkGenerator|Link generation succeeded for endpoints Route: {controller=Home}/{action=Index}/{id?} with result /Home/Privacy 2021-12-01 12:14:49.8741|100|DEBUG|Microsoft.AspNetCore.Routing.DefaultLinkGenerator|Found the endpoints Route: {controller=Home}/{action=Index}/{id?} for address Microsoft.AspNetCore.Routing.RouteValuesAddress 2021-12-01 12:14:49.8741|102|DEBUG|Microsoft.AspNetCore.Routing.DefaultLinkGenerator|Successfully processed template {controller=Home}/{action=Index}/{id?} for Route: {controller=Home}/{action=Index}/{id?} resulting in /Home/Privacy and 2021-12-01 12:14:49.8741|105|DEBUG|Microsoft.AspNetCore.Routing.DefaultLinkGenerator|Link generation succeeded for endpoints Route: {controller=Home}/{action=Index}/{id?} with result /Home/Privacy 2021-12-01 12:14:49.8741|1|DEBUG|Microsoft.WebTools.BrowserLink.Net.BrowserLinkMiddleware|Response markup is scheduled to include Browser Link script injection. 2021-12-01 12:14:49.8741|1|DEBUG|Microsoft.AspNetCore.Watch.BrowserRefresh.BrowserRefreshMiddleware|Response markup is scheduled to include browser refresh script injection. 2021-12-01 12:14:49.8741|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending HEADERS frame for stream ID 1 with length 67 and flags END_HEADERS. 2021-12-01 12:14:49.8741|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending DATA frame for stream ID 1 with length 2620 and flags NONE. 2021-12-01 12:14:49.8741|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending DATA frame for stream ID 1 with length 357 and flags NONE. 2021-12-01 12:14:49.8741|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending DATA frame for stream ID 1 with length 65 and flags NONE. 2021-12-01 12:14:49.8741|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending DATA frame for stream ID 1 with length 18 and flags NONE. 2021-12-01 12:14:49.8741|4|INFO|Microsoft.AspNetCore.Mvc.ViewFeatures.ViewResultExecutor|Executed ViewResult - view Index executed in 59.1499ms. 2021-12-01 12:14:49.8741|5|TRACE|Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker|After executing action result Microsoft.AspNetCore.Mvc.ViewResult. 2021-12-01 12:14:49.8741|2|TRACE|Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker|Result Filter: Before executing OnResultExecuted on filter Microsoft.AspNetCore.Mvc.ViewFeatures.Filters.SaveTempDataFilter. 2021-12-01 12:14:49.8741|3|TRACE|Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker|Result Filter: After executing OnResultExecuted on filter Microsoft.AspNetCore.Mvc.ViewFeatures.Filters.SaveTempDataFilter. 2021-12-01 12:14:49.8741|2|TRACE|Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker|Resource Filter: Before executing OnResourceExecuted on filter Microsoft.AspNetCore.Mvc.ViewFeatures.Filters.SaveTempDataFilter. 2021-12-01 12:14:49.8741|3|TRACE|Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker|Resource Filter: After executing OnResourceExecuted on filter Microsoft.AspNetCore.Mvc.ViewFeatures.Filters.SaveTempDataFilter. 2021-12-01 12:14:49.8741|2|INFO|Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker|Executed action ASP.NetCore6_NLog_Web_Example.Controllers.HomeController.Index (ASP.NetCore6_NLog_Web_Example) in 67.7345ms 2021-12-01 12:14:49.8741|1|INFO|Microsoft.AspNetCore.Routing.EndpointMiddleware|Executed endpoint 'ASP.NetCore6_NLog_Web_Example.Controllers.HomeController.Index (ASP.NetCore6_NLog_Web_Example)' 2021-12-01 12:14:49.8741|2|DEBUG|Microsoft.WebTools.BrowserLink.Net.BrowserLinkMiddleware|Response markup was updated to include Browser Link script injection. 2021-12-01 12:14:49.8741|2|DEBUG|Microsoft.AspNetCore.Watch.BrowserRefresh.BrowserRefreshMiddleware|Response markup was updated to include browser refresh script injection. 2021-12-01 12:14:49.8741|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending DATA frame for stream ID 1 with length 0 and flags END_STREAM. 2021-12-01 12:14:49.8741|2|INFO|Microsoft.AspNetCore.Hosting.Diagnostics|Request finished HTTP/2 GET https://localhost:7125/ - - - 200 - text/html;+charset=utf-8 175.4885ms 2021-12-01 12:14:49.8741|37|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" received HEADERS frame for stream ID 3 with length 111 and flags END_STREAM, END_HEADERS, PRIORITY. 2021-12-01 12:14:49.8741|37|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" received HEADERS frame for stream ID 5 with length 67 and flags END_STREAM, END_HEADERS, PRIORITY. 2021-12-01 12:14:49.8741|37|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" received HEADERS frame for stream ID 7 with length 90 and flags END_STREAM, END_HEADERS, PRIORITY. 2021-12-01 12:14:49.8741|37|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" received HEADERS frame for stream ID 9 with length 60 and flags END_STREAM, END_HEADERS, PRIORITY. 2021-12-01 12:14:49.8741|37|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" received HEADERS frame for stream ID 11 with length 55 and flags END_STREAM, END_HEADERS, PRIORITY. 2021-12-01 12:14:49.8741|37|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" received HEADERS frame for stream ID 13 with length 67 and flags END_STREAM, END_HEADERS, PRIORITY. 2021-12-01 12:14:49.8741|1|INFO|Microsoft.AspNetCore.Hosting.Diagnostics|Request starting HTTP/2 GET https://localhost:7125/lib/bootstrap/dist/css/bootstrap.min.css - - 2021-12-01 12:14:49.8741|1|INFO|Microsoft.AspNetCore.Hosting.Diagnostics|Request starting HTTP/2 GET https://localhost:7125/ASP.NetCore6_NLog_Web_Example.styles.css?v=GWpYr5xq67UVhdy-PN16hjqG2fx0OwqDa22TwpzjSOQ - - 2021-12-01 12:14:49.8741|1|INFO|Microsoft.AspNetCore.Hosting.Diagnostics|Request starting HTTP/2 GET https://localhost:7125/lib/jquery/dist/jquery.min.js - - 2021-12-01 12:14:49.8741|37|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" received HEADERS frame for stream ID 15 with length 52 and flags END_STREAM, END_HEADERS, PRIORITY. 2021-12-01 12:14:49.8741|1|INFO|Microsoft.AspNetCore.Hosting.Diagnostics|Request starting HTTP/2 GET https://localhost:7125/css/site.css?v=AKvNjO3dCPPS0eSU1Ez8T2wI280i08yGycV9ndytL-c - - 2021-12-01 12:14:49.8741|1|INFO|Microsoft.AspNetCore.Hosting.Diagnostics|Request starting HTTP/2 GET https://localhost:7125/lib/bootstrap/dist/js/bootstrap.bundle.min.js - - 2021-12-01 12:14:49.8741|37|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" received HEADERS frame for stream ID 17 with length 33 and flags END_STREAM, END_HEADERS, PRIORITY. 2021-12-01 12:14:49.8741|2|TRACE|Microsoft.AspNetCore.HostFiltering.HostFilteringMiddleware|All hosts are allowed. 2021-12-01 12:14:49.8741|2|TRACE|Microsoft.AspNetCore.HostFiltering.HostFilteringMiddleware|All hosts are allowed. 2021-12-01 12:14:49.8741|1|INFO|Microsoft.AspNetCore.Hosting.Diagnostics|Request starting HTTP/2 GET https://localhost:7125/_framework/aspnetcore-browser-refresh.js - - 2021-12-01 12:14:49.8741|2|TRACE|Microsoft.AspNetCore.HostFiltering.HostFilteringMiddleware|All hosts are allowed. 2021-12-01 12:14:49.8741|2|TRACE|Microsoft.AspNetCore.HostFiltering.HostFilteringMiddleware|All hosts are allowed. 2021-12-01 12:14:49.8741|2|TRACE|Microsoft.AspNetCore.HostFiltering.HostFilteringMiddleware|All hosts are allowed. 2021-12-01 12:14:49.8741|1|INFO|Microsoft.AspNetCore.Hosting.Diagnostics|Request starting HTTP/2 GET https://localhost:7125/js/site.js?v=4q1jwFhaPaZgr8WAUSrux6hAuh0XDg9kPS3xIVq36I0 - - 2021-12-01 12:14:49.8741|2|TRACE|Microsoft.AspNetCore.HostFiltering.HostFilteringMiddleware|All hosts are allowed. 2021-12-01 12:14:49.8741|1|INFO|Microsoft.AspNetCore.Hosting.Diagnostics|Request starting HTTP/2 GET https://localhost:7125/_vs/browserLink - - 2021-12-01 12:14:49.8741|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending HEADERS frame for stream ID 15 with length 60 and flags END_HEADERS. 2021-12-01 12:14:49.8741|0|TRACE|Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware|Range header's value is empty. 2021-12-01 12:14:49.8741|0|TRACE|Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware|Range header's value is empty. 2021-12-01 12:14:49.8741|0|TRACE|Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware|Range header's value is empty. 2021-12-01 12:14:49.8741|0|TRACE|Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware|Range header's value is empty. 2021-12-01 12:14:49.8741|0|TRACE|Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware|Range header's value is empty. 2021-12-01 12:14:49.8741|0|TRACE|Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware|Range header's value is empty. 2021-12-01 12:14:49.8741|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending DATA frame for stream ID 15 with length 16384 and flags NONE. 2021-12-01 12:14:49.8741|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending DATA frame for stream ID 15 with length 155 and flags NONE. 2021-12-01 12:14:49.8741|0|DEBUG|Microsoft.AspNetCore.Watch.BrowserRefresh.BrowserScriptMiddleware|Script injected: /_framework/aspnetcore-browser-refresh.js 2021-12-01 12:14:49.8741|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending DATA frame for stream ID 15 with length 0 and flags END_STREAM. 2021-12-01 12:14:49.8741|2|INFO|Microsoft.AspNetCore.Hosting.Diagnostics|Request finished HTTP/2 GET https://localhost:7125/_framework/aspnetcore-browser-refresh.js - - - 200 16539 application/javascript;+charset=utf-8 2.4021ms 2021-12-01 12:14:49.8741|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending HEADERS frame for stream ID 11 with length 92 and flags END_HEADERS. 2021-12-01 12:14:49.8741|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending HEADERS frame for stream ID 9 with length 33 and flags END_HEADERS. 2021-12-01 12:14:49.8741|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending HEADERS frame for stream ID 5 with length 40 and flags END_HEADERS. 2021-12-01 12:14:49.8741|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending HEADERS frame for stream ID 13 with length 31 and flags END_HEADERS. 2021-12-01 12:14:49.8741|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending HEADERS frame for stream ID 7 with length 62 and flags END_HEADERS. 2021-12-01 12:14:49.8741|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending HEADERS frame for stream ID 3 with length 34 and flags END_HEADERS. 2021-12-01 12:14:49.8741|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending DATA frame for stream ID 11 with length 16384 and flags NONE. 2021-12-01 12:14:49.8741|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending DATA frame for stream ID 9 with length 16384 and flags NONE. 2021-12-01 12:14:49.8741|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending DATA frame for stream ID 5 with length 194 and flags NONE. 2021-12-01 12:14:49.8741|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending DATA frame for stream ID 13 with length 230 and flags NONE. 2021-12-01 12:14:49.8741|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending DATA frame for stream ID 7 with length 1108 and flags NONE. 2021-12-01 12:14:49.8741|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending DATA frame for stream ID 3 with length 16384 and flags NONE. 2021-12-01 12:14:49.8741|2|INFO|Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware|Sending file. Request path: '/js/site.js'. Physical path: 'D:\Repos\NLog.Web\examples\ASP.NET Core 6\ASP.NET Core 6 NLog Example\wwwroot\js\site.js' 2021-12-01 12:14:49.8741|2|INFO|Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware|Sending file. Request path: '/ASP.NetCore6_NLog_Web_Example.styles.css'. Physical path: 'D:\Repos\NLog.Web\examples\ASP.NET Core 6\ASP.NET Core 6 NLog Example\obj\Debug\net6.0\scopedcss\bundle\ASP.NetCore6_NLog_Web_Example.styles.css' 2021-12-01 12:14:49.8741|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending DATA frame for stream ID 13 with length 0 and flags END_STREAM. 2021-12-01 12:14:49.8741|2|INFO|Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware|Sending file. Request path: '/css/site.css'. Physical path: 'D:\Repos\NLog.Web\examples\ASP.NET Core 6\ASP.NET Core 6 NLog Example\wwwroot\css\site.css' 2021-12-01 12:14:49.8741|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending DATA frame for stream ID 7 with length 0 and flags END_STREAM. 2021-12-01 12:14:49.8741|2|INFO|Microsoft.AspNetCore.Hosting.Diagnostics|Request finished HTTP/2 GET https://localhost:7125/js/site.js?v=4q1jwFhaPaZgr8WAUSrux6hAuh0XDg9kPS3xIVq36I0 - - - 200 230 application/javascript 3.2782ms 2021-12-01 12:14:49.8741|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending DATA frame for stream ID 5 with length 0 and flags END_STREAM. 2021-12-01 12:14:49.8741|2|INFO|Microsoft.AspNetCore.Hosting.Diagnostics|Request finished HTTP/2 GET https://localhost:7125/ASP.NetCore6_NLog_Web_Example.styles.css?v=GWpYr5xq67UVhdy-PN16hjqG2fx0OwqDa22TwpzjSOQ - - - 200 1108 text/css 3.5537ms 2021-12-01 12:14:49.8741|2|INFO|Microsoft.AspNetCore.Hosting.Diagnostics|Request finished HTTP/2 GET https://localhost:7125/css/site.css?v=AKvNjO3dCPPS0eSU1Ez8T2wI280i08yGycV9ndytL-c - - - 200 194 text/css 3.5990ms 2021-12-01 12:14:49.8741|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending DATA frame for stream ID 9 with length 16384 and flags NONE. 2021-12-01 12:14:49.8741|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending DATA frame for stream ID 11 with length 16384 and flags NONE. 2021-12-01 12:14:49.8741|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending DATA frame for stream ID 3 with length 16384 and flags NONE. 2021-12-01 12:14:49.8741|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending DATA frame for stream ID 9 with length 16384 and flags NONE. 2021-12-01 12:14:49.8741|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending DATA frame for stream ID 11 with length 16384 and flags NONE. 2021-12-01 12:14:49.8741|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending DATA frame for stream ID 3 with length 16384 and flags NONE. 2021-12-01 12:14:49.8741|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending DATA frame for stream ID 9 with length 16384 and flags NONE. 2021-12-01 12:14:49.8741|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending DATA frame for stream ID 3 with length 16384 and flags NONE. 2021-12-01 12:14:49.8741|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending DATA frame for stream ID 11 with length 16384 and flags NONE. 2021-12-01 12:14:49.8741|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending DATA frame for stream ID 9 with length 16384 and flags NONE. 2021-12-01 12:14:49.8741|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending DATA frame for stream ID 3 with length 16384 and flags NONE. 2021-12-01 12:14:49.8741|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending DATA frame for stream ID 3 with length 16384 and flags NONE. 2021-12-01 12:14:49.8741|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending DATA frame for stream ID 9 with length 7558 and flags NONE. 2021-12-01 12:14:49.8741|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending DATA frame for stream ID 11 with length 12938 and flags NONE. 2021-12-01 12:14:49.8741|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending DATA frame for stream ID 3 with length 16384 and flags NONE. 2021-12-01 12:14:49.8741|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending DATA frame for stream ID 3 with length 16384 and flags NONE. 2021-12-01 12:14:49.8741|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending DATA frame for stream ID 3 with length 16384 and flags NONE. 2021-12-01 12:14:49.8741|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending DATA frame for stream ID 3 with length 15270 and flags NONE. 2021-12-01 12:14:49.8741|2|INFO|Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware|Sending file. Request path: '/lib/jquery/dist/jquery.min.js'. Physical path: 'D:\Repos\NLog.Web\examples\ASP.NET Core 6\ASP.NET Core 6 NLog Example\wwwroot\lib\jquery\dist\jquery.min.js' 2021-12-01 12:14:49.8741|2|INFO|Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware|Sending file. Request path: '/lib/bootstrap/dist/css/bootstrap.min.css'. Physical path: 'D:\Repos\NLog.Web\examples\ASP.NET Core 6\ASP.NET Core 6 NLog Example\wwwroot\lib\bootstrap\dist\css\bootstrap.min.css' 2021-12-01 12:14:49.8741|2|INFO|Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware|Sending file. Request path: '/lib/bootstrap/dist/js/bootstrap.bundle.min.js'. Physical path: 'D:\Repos\NLog.Web\examples\ASP.NET Core 6\ASP.NET Core 6 NLog Example\wwwroot\lib\bootstrap\dist\js\bootstrap.bundle.min.js' 2021-12-01 12:14:49.8741|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending DATA frame for stream ID 9 with length 0 and flags END_STREAM. 2021-12-01 12:14:49.8741|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending DATA frame for stream ID 3 with length 0 and flags END_STREAM. 2021-12-01 12:14:49.8741|2|INFO|Microsoft.AspNetCore.Hosting.Diagnostics|Request finished HTTP/2 GET https://localhost:7125/lib/jquery/dist/jquery.min.js - - - 200 89478 application/javascript 6.0100ms 2021-12-01 12:14:49.8741|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending DATA frame for stream ID 11 with length 0 and flags END_STREAM. 2021-12-01 12:14:49.8741|2|INFO|Microsoft.AspNetCore.Hosting.Diagnostics|Request finished HTTP/2 GET https://localhost:7125/lib/bootstrap/dist/css/bootstrap.min.css - - - 200 162726 text/css 6.0675ms 2021-12-01 12:14:49.8741|2|INFO|Microsoft.AspNetCore.Hosting.Diagnostics|Request finished HTTP/2 GET https://localhost:7125/lib/bootstrap/dist/js/bootstrap.bundle.min.js - - - 200 78474 application/javascript 6.0720ms 2021-12-01 12:14:49.9220|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending HEADERS frame for stream ID 17 with length 119 and flags END_HEADERS. 2021-12-01 12:14:49.9220|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending DATA frame for stream ID 17 with length 9986 and flags NONE. 2021-12-01 12:14:49.9220|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending DATA frame for stream ID 17 with length 10240 and flags NONE. 2021-12-01 12:14:49.9220|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending DATA frame for stream ID 17 with length 10240 and flags NONE. 2021-12-01 12:14:49.9220|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending DATA frame for stream ID 17 with length 10240 and flags NONE. 2021-12-01 12:14:49.9220|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending DATA frame for stream ID 17 with length 10240 and flags NONE. 2021-12-01 12:14:49.9220|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending DATA frame for stream ID 17 with length 10240 and flags NONE. 2021-12-01 12:14:49.9220|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending DATA frame for stream ID 17 with length 10240 and flags NONE. 2021-12-01 12:14:49.9220|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending DATA frame for stream ID 17 with length 10240 and flags NONE. 2021-12-01 12:14:49.9220|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending DATA frame for stream ID 17 with length 10240 and flags NONE. 2021-12-01 12:14:49.9220|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending DATA frame for stream ID 17 with length 10240 and flags NONE. 2021-12-01 12:14:49.9220|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending DATA frame for stream ID 17 with length 10240 and flags NONE. 2021-12-01 12:14:49.9220|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending DATA frame for stream ID 17 with length 10240 and flags NONE. 2021-12-01 12:14:49.9220|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending DATA frame for stream ID 17 with length 10240 and flags NONE. 2021-12-01 12:14:49.9220|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending DATA frame for stream ID 17 with length 10240 and flags NONE. 2021-12-01 12:14:49.9220|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending DATA frame for stream ID 17 with length 10240 and flags NONE. 2021-12-01 12:14:49.9220|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending DATA frame for stream ID 17 with length 1806 and flags NONE. 2021-12-01 12:14:49.9220|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending DATA frame for stream ID 17 with length 0 and flags END_STREAM. 2021-12-01 12:14:49.9220|2|INFO|Microsoft.AspNetCore.Hosting.Diagnostics|Request finished HTTP/2 GET https://localhost:7125/_vs/browserLink - - - 200 - text/javascript;+charset=UTF-8 26.5344ms 2021-12-01 12:14:49.9406|37|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" received HEADERS frame for stream ID 19 with length 94 and flags END_STREAM, END_HEADERS, PRIORITY. 2021-12-01 12:14:49.9406|1|INFO|Microsoft.AspNetCore.Hosting.Diagnostics|Request starting HTTP/2 GET https://localhost:7125/favicon.ico - - 2021-12-01 12:14:49.9406|2|TRACE|Microsoft.AspNetCore.HostFiltering.HostFilteringMiddleware|All hosts are allowed. 2021-12-01 12:14:49.9406|0|TRACE|Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware|Range header's value is empty. 2021-12-01 12:14:49.9406|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending HEADERS frame for stream ID 19 with length 45 and flags END_HEADERS. 2021-12-01 12:14:49.9406|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending DATA frame for stream ID 19 with length 5430 and flags NONE. 2021-12-01 12:14:49.9406|2|INFO|Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware|Sending file. Request path: '/favicon.ico'. Physical path: 'D:\Repos\NLog.Web\examples\ASP.NET Core 6\ASP.NET Core 6 NLog Example\wwwroot\favicon.ico' 2021-12-01 12:14:49.9406|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending DATA frame for stream ID 19 with length 0 and flags END_STREAM. 2021-12-01 12:14:49.9406|2|INFO|Microsoft.AspNetCore.Hosting.Diagnostics|Request finished HTTP/2 GET https://localhost:7125/favicon.ico - - - 200 5430 image/x-icon 0.5155ms 2021-12-01 12:15:17.3318|0|INFO|Microsoft.Hosting.Lifetime|Application is shutting down... 2021-12-01 12:15:17.3318|3|DEBUG|Microsoft.Extensions.Hosting.Internal.Host|Hosting stopping 2021-12-01 12:15:17.3318|36|DEBUG|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" is closing. 2021-12-01 12:15:17.3318|48|DEBUG|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" is closed. The last processed stream ID was 19. 2021-12-01 12:15:17.3318|49|TRACE|Microsoft.AspNetCore.Server.Kestrel.Http2|Connection id "0HNHF721G7VDN" sending GOAWAY frame for stream ID 0 with length 8 and flags 0x0. 2021-12-01 12:15:17.3318|6|DEBUG|Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets|Connection id "0HNHF721G7VDN" received FIN. 2021-12-01 12:15:17.3318|7|DEBUG|Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets|Connection id "0HNHF721G7VDN" sending FIN because: "The Socket transport's send loop completed gracefully." 2021-12-01 12:15:17.3318|2|DEBUG|Microsoft.AspNetCore.Server.Kestrel.Connections|Connection id "0HNHF721G7VDN" stopped. 2021-12-01 12:15:17.3395|4|DEBUG|Microsoft.Extensions.Hosting.Internal.Host|Hosting stoppedNext step, seeConfigure NLog with nlog.config
-Troubleshooting Guide - See available NLog Targets and Layouts:https://nlog-project.org/config
- All targets, layouts and layout renderers
Popular: - Using NLog with NLog.config
- Using NLog with appsettings.json