.NET Core Web Application works on Localhost but not when published to Azure as App Service



  • My jsreport will work on my development Localhost but runs into an exception when published to Azure as an App Service (App Service Plan:Standard)

    I get the following exception when I click on menu:
    An unhandled exception occurred while processing the request.
    Win32Exception: The specified executable is not a valid application for this OS platform.
    System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)

    I have upgraded my project in Visual Studio 2017 from ASP.NET Core 2.1 to ASP.NET Core 2.2 and have reviewed the following link for reference. ( https://jsreport.net/learn/dotnet-aspnetcore )

    I have the following installed via Nuget Package Manager
    jsreport.AspNetCore v2.0.0
    jsreport.Binary v2.3.1
    jsreport.Local v2.0.0
    jsreport.Shared v2.0.1
    jsreport.Types v2.2.7

    The Controller is decorated as following:
    [MiddlewareFilter(typeof(JsReportPipeline))]

    The following line of code worked previously:

    HttpContext.JsReportFeature().Recipe(jsreport.Types.Recipe.ChromePdf);

    Any ideas or recommendations would be great.
    Thanks,
    Les





  • Running this as Linux App does not look like an option at this time.
    I trying to understand the following: "external service like jsreportonline and connect to it from Azure Web App using jsreport.Client"
    What would the coding example be if I am working from my controller:
    ie..
    [MiddlewareFilter(typeof(JsReportPipeline))]
    HttpContext.JsReportFeature().Recipe(jsreport.Types.Recipe.ChromePdf);
    How do I redirect this to jsreportonline?





  • I have changed my startup.cs and included the following (xxx is an example)
    services.AddJsReport(new ReportingService("https://xxx.jsreportonline.net", "xxx-email", "xxx-password"));

    And I have left the following the same in my Controller:
    MiddlewareFilter(typeof(JsReportPipeline))]
    HttpContext.JsReportFeature().Recipe(jsreport.Types.Recipe.ChromePdf);

    I am not using a template, but rather get a "screenshot" of the view

    I get the following error:
    JsReportException: Unable to render template.
    jsreport.Client.ReportingService.RenderAsync(string request, CancellationToken ct)



  • I have this working now. My "xxx-email" account had a typing mistake in it.
    Thanks for you help.
    Les


Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.