Cannot generate report with GetLicense exception

Posted by: p_ffung on 18 November 2020, 12:53 am EST

  • Posted 18 November 2020, 12:53 am EST

    Hi,

    We are developing a .NET Core 3.1 project that generating Active Reports.

    The problem is :
    This project is "Build" in a server with an Active License, then "Publish" and generated report successfully.
    But when i "Publish" to another server with only Trial License (in my understanding this should not be a problem for generating report),

    the report cannot be generated with below exception:

    {"type":"S00000","title":"The type initializer for 'System.Security.Cryptography.CngKeyLite' threw an exception.","status":500,"detail":" at GrapeCity.ActiveReports.Internal.`1.GetLicense(LicenseContext context, Type type, Object instance, Boolean allowExceptions)\r\n at System.ComponentModel.LicenseManager.ValidateInternalRecursive(LicenseContext context, Type type, Object instance, Boolean allowExceptions, License& license, String& licenseKey)\r\n at System.ComponentModel.LicenseManager.Validate(Type type, Object instance)\r\n at GrapeCity.ActiveReports.PageReport..<GetLicense>b__0(Boolean access)\r\n at GrapeCity.ActiveReports.AssertionHelper..<ExecuteWithMemberAccessAssert>b__0(Boolean access)\r\n at GrapeCity.ActiveReports.AssertionHelper.ExecuteWithAssert(CodeAccessPermission permission, Action`1 action)\r\n at GrapeCity.ActiveReports.AssertionHelper.ExecuteWithMemberAccessAssert(Action`1 action)\r\n at GrapeCity.ActiveReports.PageReport.GetLicense(Object obj)\r\n at GrapeCity.ActiveReports.PageReport.ValidateLicense()\r\n at Cnpis.Service.Report.ReportService.GenerateReport(String reportId, IDictionary`2 param) in {folder_path}\\ReportService.cs:line 48\r\n at Cnpis.Web.Api.Controllers.Report.ReportController.Get(String rptId) in {folder_path}\\ReportController.cs:line 21\r\n at lambda_method(Closure , Object )\r\n at Microsoft.Extensions.Internal.ObjectMethodExecutorAwaitable.Awaiter.GetResult()\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|19_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)\r\n at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)\r\n at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)\r\n at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)\r\n at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)\r\n at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)\r\n at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)","traceId":"|5a076ef2-42e4738eb196f454."}

    Could provide any help?
    Thanks
  • Replied 18 November 2020, 4:38 pm EST

    Hello,

    I have answered the issue in the support one case:
    https://supportone.componentone.com/casedetail/469291

    Please reply to above support case only to avoid confusion.

    Thanks,
    Mohit
  • Replied 19 November 2020, 1:13 pm EST

    Hi,

    May i know if
    1. .NET Core project could Build and Publish to IIS by a Server with only Trial License, 2. But the Server to generate Active Report must have an Activated License?
  • Replied 23 November 2020, 4:21 am EST

    Hi,

    ActiveReports doesn't need to be installed on the Publish server. It needs to be installed and licensed on the Development and Build machines. Please uninstall ActiveReports from the server on which you publish your app, add the license to your app and publish the app again. Refer to the following documentation link to license your app: https://www.grapecity.com/activereportsnet/docs/v14/online/licensing-a-project.html
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels