.NET The specified executable is not a valid application for this OS platform



  • Currently the library works as expected in my development mahcine (Windows 10 64 bits), but tried to move the project to a Windows 2008 R2 and i get : The specified executable is not a valid application for this OS platform

    Im using it as a utility in a .net 4.6.1 project



  • Hm. Not sure we can help with this.

    Is the windows server 64bit? The jsreport binary is compiled only for 64bits.
    Does node.js runs on that server? The jsreport binary is just differently compiled node.js



  • Yes, the server is 64 bits.
    Yes, node.js is intalled on the server

    I was trying to remove Crystal reports dependencies from a project via nuget and when i deploy it it seems that it cannot create the jsreport binary for some reason.
    If i deployed it without removing the crystal dependencies everything worked as expected (weird i know...)

    Anyway, i just manually removed the dependencies and just to be sure, changed the default TempDirectory to point to:
    Path.Combine(System.Web.Hosting.HostingEnvironment.MapPath("~"), "jsreport", "temp");
    and it seems to be working fine

    Just for the record:
    When render async is called (and you do not specify a TempDirectory in the configuration of the reporting service) it tries to create a jsreport folder inside the Windows/Temp folder (if the apppool identity in iss is the default one) or inside Users/XXXX/AppData/Temp and Windows/Temp (if the apppool identity is not the default one),
    this jsreport temp folder contains the binary, so if this problem happens be sure to check the size, it should be ~35mb AND NOT 0kb


Log in to reply
 

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