Hello, I am trying to use Ghostscript.NET on a web server for back-end processing. It works fine under a single user, but when I kick off a process with multiple users the .StartProcessing call will fail with the following error:
An error occured when call to 'gsapi_new_instance' is made: -100
This looks to me like a threading or similar multi-user error, but I'm not sure how to resolve it. I am running GS 9.10 GPL, ASP.NET 4.5 and IIS 7. Is there something specific I need to configure for Ghostscript to make it work on a web server?
Thank you,
Shawn
Here is my source code:
GhostscriptVersionInfo _gs_version_info =
List<string> switches = new List<string>();
switches.Add("-empty");
switches.Add("-dQUIET");
switches.Add("-dSAFER");
switches.Add("-dBATCH");
switches.Add("-dNOPAUSE");
switches.Add("-dEPSCrop");
switches.Add("-sDEVICE=pdfwrite");
switches.Add("-sOutputFile=" + variantPath);
switches.Add("-f");
switches.Add(originalPath);
processor.StartProcessing(switches.ToArray(), null);
An error occured when call to 'gsapi_new_instance' is made: -100
This looks to me like a threading or similar multi-user error, but I'm not sure how to resolve it. I am running GS 9.10 GPL, ASP.NET 4.5 and IIS 7. Is there something specific I need to configure for Ghostscript to make it work on a web server?
Thank you,
Shawn
Here is my source code:
GhostscriptVersionInfo _gs_version_info =
GhostscriptVersionInfo.GetLastInstalledVersion(GhostscriptLicense.GPL | GhostscriptLicense.AFPL, GhostscriptLicense.GPL);
GhostscriptProcessor processor = new GhostscriptProcessor(_gs_version_info);List<string> switches = new List<string>();
switches.Add("-empty");
switches.Add("-dQUIET");
switches.Add("-dSAFER");
switches.Add("-dBATCH");
switches.Add("-dNOPAUSE");
switches.Add("-dEPSCrop");
switches.Add("-sDEVICE=pdfwrite");
switches.Add("-sOutputFile=" + variantPath);
switches.Add("-f");
switches.Add(originalPath);
processor.StartProcessing(switches.ToArray(), null);