When I change LogLevel to Trace in appsettings.json, it started to log to file. But there is no logging regarding mail service. See attached log after ForgotPassword request.
2021-06-17 09:44:29,258 [15] INFO Microsoft.AspNetCore.Hosting.Diagnostics - Request starting HTTP/1.1 POST https://localhost:8443/account/ForgotPassword application/x-www-form-urlencoded 217
2021-06-17 09:44:29,258 [15] TRACE Microsoft.AspNetCore.HostFiltering.HostFilteringMiddleware - All hosts are allowed.
2021-06-17 09:44:29,258 [15] TRACE Microsoft.AspNetCore.HttpsPolicy.HstsMiddleware - Adding HSTS header to response.
2021-06-17 09:44:29,260 [15] INFO Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware - No CORS policy found for the specified request.
2021-06-17 09:44:29,260 [15] DEBUG Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationHandler - AuthenticationScheme: Identity.Application was not authenticated.
2021-06-17 09:44:29,260 [15] DEBUG Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationHandler - AuthenticationScheme: Identity.Application was not authenticated.
2021-06-17 09:44:29,260 [15] DEBUG Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationHandler - AuthenticationScheme: Identity.Application was not authenticated.
2021-06-17 09:44:29,260 [15] DEBUG Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware - POST requests are not supported
2021-06-17 09:44:29,260 [15] DEBUG Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware - POST requests are not supported
2021-06-17 09:44:29,260 [15] DEBUG Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware - POST requests are not supported
2021-06-17 09:44:29,261 [15] DEBUG Microsoft.AspNetCore.Cors.Infrastructure.CorsService - The request has an origin header: 'null'.
2021-06-17 09:44:29,261 [15] INFO Microsoft.AspNetCore.Cors.Infrastructure.CorsService - CORS policy execution successful.
2021-06-17 09:44:29,261 [15] DEBUG Microsoft.AspNetCore.Routing.Tree.TreeRouter - Request successfully matched the route with name '(null)' and template 'account/ForgotPassword'
2021-06-17 09:44:29,261 [15] DEBUG Microsoft.AspNetCore.Mvc.Infrastructure.ActionSelector - Action 'Origam.ServerCore.IdentityServerGui.Account.AccountController.ForgotPassword (Origam.ServerCore)' with id 'c70943e5-3326-4e76-867a-dc2d9e664836' did not match the constraint 'Microsoft.AspNetCore.Mvc.ActionConstraints.HttpMethodActionConstraint'
2021-06-17 09:44:29,320 [15] INFO Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker - Route matched with {action = "ForgotPassword", controller = "Account"}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.IActionResult] ForgotPassword(Origam.ServerCore.IdentityServerGui.Account.ForgotPasswordViewModel) on controller Origam.ServerCore.IdentityServerGui.Account.AccountController (Origam.ServerCore).
2021-06-17 09:44:29,320 [15] DEBUG Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker - Execution plan of authorization filters (in the following order): Microsoft.AspNetCore.Mvc.ViewFeatures.Filters.ValidateAntiforgeryTokenAuthorizationFilter
2021-06-17 09:44:29,320 [15] DEBUG Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker - Execution plan of resource filters (in the following order): Microsoft.AspNetCore.Mvc.ViewFeatures.Filters.SaveTempDataFilter
2021-06-17 09:44:29,320 [15] 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), Origam.ServerCore.IdentityServerGui.SecurityHeadersAttribute (Order: 0)
2021-06-17 09:44:29,320 [15] DEBUG Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker - Execution plan of exception filters (in the following order): None
2021-06-17 09:44:29,320 [15] DEBUG Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker - Execution plan of result filters (in the following order): Microsoft.AspNetCore.Mvc.ViewFeatures.Filters.SaveTempDataFilter, Origam.ServerCore.IdentityServerGui.SecurityHeadersAttribute (Order: 0)
2021-06-17 09:44:29,320 [15] TRACE Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker - Authorization Filter: Before executing OnAuthorizationAsync on filter Microsoft.AspNetCore.Mvc.ViewFeatures.Filters.ValidateAntiforgeryTokenAuthorizationFilter.
2021-06-17 09:44:29,326 [15] TRACE Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector - Performing unprotect operation to key {5a869d1c-4ce3-4187-b860-92be2caaf7f5} with purposes ('C:\inetpub\html5test2', 'Microsoft.AspNetCore.Antiforgery.AntiforgeryToken.v1').
2021-06-17 09:44:29,326 [15] TRACE Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector - Performing unprotect operation to key {5a869d1c-4ce3-4187-b860-92be2caaf7f5} with purposes ('C:\inetpub\html5test2', 'Microsoft.AspNetCore.Antiforgery.AntiforgeryToken.v1').
2021-06-17 09:44:29,326 [15] DEBUG Microsoft.AspNetCore.Antiforgery.DefaultAntiforgery - Antiforgery successfully validated a request.
2021-06-17 09:44:29,326 [15] TRACE Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker - Authorization Filter: After executing OnAuthorizationAsync on filter Microsoft.AspNetCore.Mvc.ViewFeatures.Filters.ValidateAntiforgeryTokenAuthorizationFilter.
2021-06-17 09:44:29,326 [15] TRACE Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker - Resource Filter: Before executing OnResourceExecuting on filter Microsoft.AspNetCore.Mvc.ViewFeatures.Filters.SaveTempDataFilter.
2021-06-17 09:44:29,326 [15] TRACE Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker - Resource Filter: After executing OnResourceExecuting on filter Microsoft.AspNetCore.Mvc.ViewFeatures.Filters.SaveTempDataFilter.
2021-06-17 09:44:29,326 [15] DEBUG Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker - Executing controller factory for controller Origam.ServerCore.IdentityServerGui.Account.AccountController (Origam.ServerCore)
2021-06-17 09:44:29,340 [15] DEBUG Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker - Executed controller factory for controller Origam.ServerCore.IdentityServerGui.Account.AccountController (Origam.ServerCore)
2021-06-17 09:44:29,349 [15] DEBUG Microsoft.AspNetCore.Mvc.ModelBinding.ParameterBinder - Attempting to bind parameter 'model' of type 'Origam.ServerCore.IdentityServerGui.Account.ForgotPasswordViewModel' ...
2021-06-17 09:44:29,350 [15] DEBUG Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ComplexObjectModelBinder - Attempting to bind parameter 'model' of type 'Origam.ServerCore.IdentityServerGui.Account.ForgotPasswordViewModel' using the name '' in request data ...
2021-06-17 09:44:29,353 [15] DEBUG Microsoft.AspNetCore.Mvc.ModelBinding.Binders.SimpleTypeModelBinder - Attempting to bind property 'Origam.ServerCore.IdentityServerGui.Account.ForgotPasswordViewModel.Email' of type 'System.String' using the name 'Email' in request data ...
2021-06-17 09:44:29,354 [15] DEBUG Microsoft.AspNetCore.Mvc.ModelBinding.Binders.SimpleTypeModelBinder - Done attempting to bind property 'Origam.ServerCore.IdentityServerGui.Account.ForgotPasswordViewModel.Email' of type 'System.String'.
2021-06-17 09:44:29,356 [15] DEBUG Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ComplexObjectModelBinder - Done attempting to bind parameter 'model' of type 'Origam.ServerCore.IdentityServerGui.Account.ForgotPasswordViewModel'.
2021-06-17 09:44:29,356 [15] DEBUG Microsoft.AspNetCore.Mvc.ModelBinding.ParameterBinder - Done attempting to bind parameter 'model' of type 'Origam.ServerCore.IdentityServerGui.Account.ForgotPasswordViewModel'.
2021-06-17 09:44:29,356 [15] DEBUG Microsoft.AspNetCore.Mvc.ModelBinding.ParameterBinder - Attempting to validate the bound parameter 'model' of type 'Origam.ServerCore.IdentityServerGui.Account.ForgotPasswordViewModel' ...
2021-06-17 09:44:29,363 [15] DEBUG Microsoft.AspNetCore.Mvc.ModelBinding.ParameterBinder - Done attempting to validate the bound parameter 'model' of type 'Origam.ServerCore.IdentityServerGui.Account.ForgotPasswordViewModel'.
2021-06-17 09:44:29,363 [15] TRACE Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker - Action Filter: Before executing OnActionExecutionAsync on filter Microsoft.AspNetCore.Mvc.Filters.ControllerActionFilter.
2021-06-17 09:44:29,363 [15] TRACE Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker - Action Filter: Before executing OnActionExecuting on filter Microsoft.AspNetCore.Mvc.ModelBinding.UnsupportedContentTypeFilter.
2021-06-17 09:44:29,363 [15] TRACE Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker - Action Filter: After executing OnActionExecuting on filter Microsoft.AspNetCore.Mvc.ModelBinding.UnsupportedContentTypeFilter.
2021-06-17 09:44:29,363 [15] TRACE Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker - Action Filter: Before executing OnActionExecutionAsync on filter Origam.ServerCore.IdentityServerGui.SecurityHeadersAttribute.
2021-06-17 09:44:29,363 [15] INFO Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker - Executing action method Origam.ServerCore.IdentityServerGui.Account.AccountController.ForgotPassword (Origam.ServerCore) - Validation state: Valid
2021-06-17 09:44:29,363 [15] TRACE Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker - Executing action method Origam.ServerCore.IdentityServerGui.Account.AccountController.ForgotPassword (Origam.ServerCore) with arguments (Origam.ServerCore.IdentityServerGui.Account.ForgotPasswordViewModel)
2021-06-17 09:44:29,544 [15] TRACE Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector - Performing protect operation to key {5a869d1c-4ce3-4187-b860-92be2caaf7f5} with purposes ('C:\inetpub\html5test2', 'DataProtectorTokenProvider').
2021-06-17 09:44:29,923 [15] INFO Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker - Executed action method Origam.ServerCore.IdentityServerGui.Account.AccountController.ForgotPassword (Origam.ServerCore), returned result Microsoft.AspNetCore.Mvc.ViewResult in 559.6333ms.
2021-06-17 09:44:29,923 [15] TRACE Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker - Action Filter: After executing OnActionExecutionAsync on filter Origam.ServerCore.IdentityServerGui.SecurityHeadersAttribute.
2021-06-17 09:44:29,923 [15] TRACE Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker - Action Filter: Before executing OnActionExecuted on filter Microsoft.AspNetCore.Mvc.ModelBinding.UnsupportedContentTypeFilter.
2021-06-17 09:44:29,923 [15] TRACE Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker - Action Filter: After executing OnActionExecuted on filter Microsoft.AspNetCore.Mvc.ModelBinding.UnsupportedContentTypeFilter.
2021-06-17 09:44:29,923 [15] TRACE Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker - Action Filter: After executing OnActionExecutionAsync on filter Microsoft.AspNetCore.Mvc.Filters.ControllerActionFilter.
2021-06-17 09:44:29,923 [15] TRACE Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker - Result Filter: Before executing OnResultExecuting on filter Microsoft.AspNetCore.Mvc.ViewFeatures.Filters.SaveTempDataFilter.
2021-06-17 09:44:29,923 [15] TRACE Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker - Result Filter: After executing OnResultExecuting on filter Microsoft.AspNetCore.Mvc.ViewFeatures.Filters.SaveTempDataFilter.
2021-06-17 09:44:29,923 [15] TRACE Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker - Result Filter: Before executing OnResultExecutionAsync on filter Origam.ServerCore.IdentityServerGui.SecurityHeadersAttribute.
2021-06-17 09:44:29,923 [15] TRACE Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker - Before executing action result Microsoft.AspNetCore.Mvc.ViewResult.
2021-06-17 09:44:29,923 [15] DEBUG Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine - View lookup cache miss for view 'ForgotPasswordConfirmation' in controller 'Account'.
2021-06-17 09:44:29,923 [15] TRACE Microsoft.AspNetCore.Mvc.Razor.Compilation.DefaultViewCompiler - Could not find a file for view at path '/Views/Account/ForgotPasswordConfirmation.cs-CZ.cshtml'.
2021-06-17 09:44:29,923 [15] TRACE Microsoft.AspNetCore.Mvc.Razor.Compilation.DefaultViewCompiler - Could not find a file for view at path '/Views/Account/ForgotPasswordConfirmation.cs.cshtml'.
2021-06-17 09:44:29,923 [15] TRACE Microsoft.AspNetCore.Mvc.Razor.Compilation.DefaultViewCompiler - Located compiled view for view at path '/Views/Account/ForgotPasswordConfirmation.cshtml'.
2021-06-17 09:44:29,924 [15] TRACE Microsoft.AspNetCore.Mvc.Razor.Compilation.DefaultViewCompiler - Could not find a file for view at path '/Views/Account/_ViewStart.cshtml'.
2021-06-17 09:44:29,924 [15] TRACE Microsoft.AspNetCore.Mvc.Razor.Compilation.DefaultViewCompiler - Located compiled view for view at path '/Views/_ViewStart.cshtml'.
2021-06-17 09:44:29,924 [15] TRACE Microsoft.AspNetCore.Mvc.Razor.Compilation.DefaultViewCompiler - Could not find a file for view at path '/_ViewStart.cshtml'.
2021-06-17 09:44:29,924 [15] INFO Microsoft.AspNetCore.Mvc.ViewFeatures.ViewResultExecutor - Executing ViewResult, running view ForgotPasswordConfirmation.
2021-06-17 09:44:29,924 [15] DEBUG Microsoft.AspNetCore.Mvc.ViewFeatures.ViewResultExecutor - The view path '/Views/Account/ForgotPasswordConfirmation.cshtml' was found in 0.798ms.
2021-06-17 09:44:29,926 [15] DEBUG Microsoft.Extensions.Localization.ResourceManagerStringLocalizer - ResourceManagerStringLocalizer searched for 'CheckEmail' in 'Origam.ServerCore.Resources.SharedResources' with culture 'cs-CZ'.
2021-06-17 09:44:29,926 [15] DEBUG Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine - View lookup cache hit for view '_Layout' in controller 'Account'.
2021-06-17 09:44:29,926 [15] DEBUG Microsoft.Extensions.Localization.ResourceManagerStringLocalizer - ResourceManagerStringLocalizer searched for 'IdentityServerTitle' in 'Origam.ServerCore.Resources.SharedResources' with culture 'cs-CZ'.
2021-06-17 09:44:29,926 [15] INFO Microsoft.AspNetCore.Mvc.ViewFeatures.ViewResultExecutor - Executed ViewResult - view ForgotPasswordConfirmation executed in 3.3054ms.
2021-06-17 09:44:29,926 [15] TRACE Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker - After executing action result Microsoft.AspNetCore.Mvc.ViewResult.
2021-06-17 09:44:29,927 [15] TRACE Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker - Result Filter: After executing OnResultExecutionAsync on filter Origam.ServerCore.IdentityServerGui.SecurityHeadersAttribute.
2021-06-17 09:44:29,927 [15] TRACE Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker - Result Filter: Before executing OnResultExecuted on filter Microsoft.AspNetCore.Mvc.ViewFeatures.Filters.SaveTempDataFilter.
2021-06-17 09:44:29,927 [15] TRACE Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker - Result Filter: After executing OnResultExecuted on filter Microsoft.AspNetCore.Mvc.ViewFeatures.Filters.SaveTempDataFilter.
2021-06-17 09:44:29,927 [15] TRACE Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker - Resource Filter: Before executing OnResourceExecuted on filter Microsoft.AspNetCore.Mvc.ViewFeatures.Filters.SaveTempDataFilter.
2021-06-17 09:44:29,927 [15] TRACE Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker - Resource Filter: After executing OnResourceExecuted on filter Microsoft.AspNetCore.Mvc.ViewFeatures.Filters.SaveTempDataFilter.
2021-06-17 09:44:29,927 [15] INFO Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker - Executed action Origam.ServerCore.IdentityServerGui.Account.AccountController.ForgotPassword (Origam.ServerCore) in 606.7968ms
2021-06-17 09:44:29,927 [15] INFO Microsoft.AspNetCore.Hosting.Diagnostics - Request finished HTTP/1.1 POST https://localhost:8443/account/ForgotPassword application/x-www-form-urlencoded 217 - 200 - text/html;+charset=utf-8 669.4763ms
2021-06-17 09:44:29,969 [15] INFO Microsoft.AspNetCore.Hosting.Diagnostics - Request starting HTTP/1.1 GET https://localhost:8443/assets/identity/js/custom.js - -
2021-06-17 09:44:29,970 [15] TRACE Microsoft.AspNetCore.HostFiltering.HostFilteringMiddleware - All hosts are allowed.
2021-06-17 09:44:29,970 [15] TRACE Microsoft.AspNetCore.HttpsPolicy.HstsMiddleware - Adding HSTS header to response.
2021-06-17 09:44:29,970 [15] DEBUG Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationHandler - AuthenticationScheme: Identity.Application was not authenticated.
2021-06-17 09:44:29,970 [15] DEBUG Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationHandler - AuthenticationScheme: Identity.Application was not authenticated.
2021-06-17 09:44:29,970 [15] DEBUG Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationHandler - AuthenticationScheme: Identity.Application was not authenticated.
2021-06-17 09:44:29,970 [15] DEBUG Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware - The request path /identity/js/custom.js does not match an existing file
2021-06-17 09:44:29,970 [15] DEBUG Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware - The request path does not match the path filter
2021-06-17 09:44:29,970 [15] DEBUG Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware - The request path /assets/identity/js/custom.js does not match an existing file
2021-06-17 09:44:29,970 [15] DEBUG Microsoft.AspNetCore.Builder.RouterMiddleware - Request did not match any routes
2021-06-17 09:44:29,970 [15] DEBUG Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware - The request path /assets/identity/js/custom.js does not match an existing file
2021-06-17 09:44:29,970 [15] INFO Microsoft.AspNetCore.Hosting.Diagnostics - Request finished HTTP/1.1 GET https://localhost:8443/assets/identity/js/custom.js - - - 404 - - 1.0192ms