Cannot generate report with GetLicense exception

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

    • Post Options:
    • Link

    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.g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.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.g__Awaited|19_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)\r\n at Microsoft.AspNetCore.Routing.EndpointMiddleware.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.g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)“,“traceId”:”|5a076ef2-42e4738eb196f454."}

    Could provide any help?

    Thanks

  • Posted 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

  • Posted 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?
  • Posted 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

  • Posted 3 December 2020, 7:10 pm EST

    The problem is finally resolved at our side.

    The exception from ‘System.Security.Cryptography.CngKeyLite’ was threw because a service “CNG Key Isolation”(KeyIso) is disabled in our server.

    When this service is disabled, certificate and key would be failed to create.

    Details could be searching up with keyword “cng key isolation service disable”

    After enabling this service, no licensing issue/exception threw from application now,

Need extra support?

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

Learn More

Forum Channels