0

I have Ghostscript installed on my machine(with windows 10) and it is working properly with visual studio IIS Express on local, but after hosting application on server IIS, it throws exception Module could not be loaded. and i have installed Ghostscript 64 and 32 bit both on server.

Exception type: System.Exception\r\nMessage : Module could not be loaded.\r\nInerExceltion : \r\nStacktrace:\r\n at Microsoft.WinAny.Interop.DynamicNativeLibrary..ctor(Byte[] buffer)\r\n at Ghostscript.NET.GhostscriptLibrary..ctor(GhostscriptVersionInfo version, Boolean fromMemory)\r\n at Ghostscript.NET.Processor.GhostscriptProcessor..ctor(GhostscriptVersionInfo version, Boolean fromMemory)\r\n at Ghostscript.NET.GhostscriptDevice.Process(GhostscriptVersionInfo ghostscriptVersion, Boolean fromMemory, GhostscriptStdIO stdIO_callback)\r\n

KenS
  • 30,202
  • 3
  • 34
  • 51
devloper
  • 41
  • 1
  • 7
  • https://halfblood.pro/web-application-differences-in-visual-studio-and-iis-60fec7e311b3 Your code probably relies on environment variables to resolve GhostScript, but that won't work on IIS without proper configuration. – Lex Li Jun 05 '22 at 14:20
  • Hi I have also added dll and lib folder path to environment variables still no luck Can you please specify which configurations are needed – devloper Jun 05 '22 at 14:55
  • A quick search on its repo indicates many issues to use this library on IIS, https://github.com/jhabjan/Ghostscript.NET/issues?q=iis though the developer claimed the issues have been resolved. This is not the only library in this field, so you'd better search and switch to another that might work better with IIS. – Lex Li Jun 05 '22 at 16:04
  • Ghostscript is not the same as Ghostscript.NET, I've modified the tags. – KenS Jun 05 '22 at 18:11
  • Refer this link, hope it will help you. https://github.com/jhabjan/Ghostscript.NET/issues/34 – JennyDai Jun 06 '22 at 05:58

0 Answers0