Hello,
We need to export data for the last 30 days from the Login History report.
When I have the data ready and click on the export button, nothing happens and the Data source logs report shows an error, see error text below.
Please help me to generate this report.
Alternatively, we need to get information what user, when they logged in and from what source they logged in (RDM, Web, etc). Through Powershell I was able to get the last login date of the users, but I don't know how to get the information from which source they last logged in. Is it possible to get this information using Powershell?
WriterException - An unexpected error occurred. See inner exception for details. IWriter state:
Message WriterException - An unexpected error occurred. See inner exception for details. IWriter state: Row: 72 Index: 0 HeaderRecord: 72 at CsvHelper.CsvWriter.WriteRecords[T](IEnumerable`1 records) at Devolutions.Server.Business.Reports.ReportExporter.Export[T,M](IEnumerable`1 listToExport) at Devolutions.Server.Business.Reports.BasePagingReport`5.Export(Filters filters, PagingOptionsModel pagingOptions, Boolean buildEmpty) at Devolutions.Server.Controllers.APIControllers.V3.ReportsController.GetLoginHistoryLogsExportFile(LoginHistoryLogsPagingParameters parameters) at lambda_method4821(Closure, Object, Object[]) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync() at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope) at NSwag.AspNetCore.Middlewares.OpenApiDocumentMiddleware.Invoke(HttpContext context) at Devolutions.Server.Middleware.RequireAuthenticationOnMiddleware.InvokeAsync(HttpContext httpContext) at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context) at Devolutions.Server.Middleware.XHealTheBreachMiddleware.InvokeAsync(HttpContext httpContext) at Devolutions.Server.Middleware.ReferrerPolicyMiddleware.InvokeAsync(HttpContext httpContext) at Devolutions.Server.Middleware.StrictTransportMiddleware.InvokeAsync(HttpContext httpContext) at Devolutions.Server.Middleware.XContentTypeOptionsMiddleware.InvokeAsync(HttpContext httpContext) at Devolutions.Server.Middleware.XFrameOptionsMiddleware.InvokeAsync(HttpContext httpContext) at Devolutions.Server.Middleware.CSPMiddleware.InvokeAsync(HttpContext httpContext) at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Devolutions.Server.OAuth.Middleware.AuthSchemeDetectionMiddleware.InvokeAsync(HttpContext context) at Devolutions.Server.Middleware.LegacyTokenParserMiddleware.InvokeAsync(HttpContext httpContext) at Devolutions.Server.OAuth.Middleware.OAuthTokenParserMiddleware.InvokeAsync(HttpContext httpContext) at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context) at Serilog.AspNetCore.RequestLoggingMiddleware.Invoke(HttpContext httpContext) at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddlewareImpl.<Invoke>g__Awaited|10_0(ExceptionHandlerMiddlewareImpl middleware, HttpContext context, Task task) ------------------------------------------ NullReferenceException - Object reference not set to an instance of an object. at Devolutions.Server.Business.Reports.LoginHistory.Export.LoginHistoryLogExport.InitFromLog(LoginHistoryLogItem log) at Devolutions.Server.Business.Reports.BasePagingReport`5.<>c.<Export>b__1_0(Item log) at System.Linq.Enumerable.SelectListIterator`2.MoveNext() at CsvHelper.CsvWriter.WriteRecords[T](IEnumerable`1 records)
Hello,
Thank you for your feedback.
What DVLS version are you using?
For your information, it's not possible to get the LoginHistory logs from PowerShell.
Could you send us the report from your SQL database according to this article?
https://docs.devolutions.net/server/kb/troubleshooting-articles/en-dvls-performance-issues/
Have you enabled the Clean up logs feature?
https://docs.devolutions.net/server/web-interface/administration/logs/cleanup-logs/
Best regards,
Érica Poirier
Hello Erica,
we have made upgrade to version 2024.3.12.0 from version 2024.3.11.0, where we found this problem. This problem still presists after upgrade to latest version.
I have sent the generated report to the email service@devolutions.net as written in the article and mention this thread in the text.
We have tried run this Clean up logs feature, but it doesn't help. We hadn't setup this feature before.
Hello Jakub,
I can confirm we received the files; we're currently analyzing the situation.
We may contact you through the ticket and post the solution at the end.
Stay tuned.
Best regards,
Alex Belisle
Hello Jakub,
A ticket has been opened, and a fix will be available in the next version.
I would like to push the investigation with you, so I'll contact you through the support ticket we have together, and if it's relevant, we'll update here as well afterward.
Thanks!
Best regards,
Alex Belisle
Hello all!
We will have a fix for this in the last 2024.3 version available shortly (beginning of March).
Best regards,
Alex Belisle
Hello Alexandre,
we have installed version 2024.3.13.0 in our enviroment and problem is fixed.
Thank you for your support
best regards
Jakub
Hi Jakub!
Thanks a lot for confirming!
It was a pleasure working with you.
Have a great one!
Best regards,
Alex Belisle