.net core azure上的执行失败命令和重影脚本gswin64c.exe

.net core azure上的执行失败命令和重影脚本gswin64c.exe,.net-core,imagemagick,.net Core,Imagemagick,我正在尝试使用magickNET和ghostscript将pdf转换成图像。它在本地和windows VMS服务器上运行良好。但是当我推送到azure服务器时,它会给我一个错误,说FailedToExecuteCommand ghostscript gswin64c.exe。附件中的错误详细信息 我尝试更改ghostscript dll的路径,但没有找到运气。路径正确,并且dll文件在那里。有一件事我可以肯定。我已将dll放入wwwroot/GhostScriptDll中。在出现错误时,它会显示

我正在尝试使用magickNET和ghostscript将pdf转换成图像。它在本地和windows VMS服务器上运行良好。但是当我推送到azure服务器时,它会给我一个错误,说FailedToExecuteCommand ghostscript gswin64c.exe。附件中的错误详细信息

我尝试更改ghostscript dll的路径,但没有找到运气。路径正确,并且dll文件在那里。有一件事我可以肯定。我已将dll放入
wwwroot/GhostScriptDll
中。在出现错误时,它会显示“
D:/home/site/wwwroot/wwwroot/GhostScriptDll/gswin64c.exe
”,这也是正确的,其中有2个wwwroot。 有人能帮我在没有webjobs的情况下使用ghostscript吗

我试过的C代码是这样的

string rawpath=\u hostingEnvironment.WebRootPath+“\\GhostScriptDll”
SetGhostscriptDirectory(rawpath);
MagickReadSettings设置=新建MagickReadSettings();
设置。密度=新密度(300300);
List intList=新列表(){};
使用(MagickImageCollection images=new MagickImageCollection())
{
读取($“{rawFileLocation}{model.OriginalDocName}”,设置);
int page=1;
字符串tempName=“”;
foreach(图像中的MagickImage图像)
{
tempName=System.IO.Path.GetRandomFileName().Replace(“.”,string.Empty)+“\u processed.+page+.png”;
Write($“{processedFileLocation}{tempName}”);
intList.Add(tempName);
page++;
}
}
我怀疑这部分错误D:/local/Temp/magick-MB0cs71xMgZUfIHIwbzlzehBIlLL-NED“”(系统找不到指定的文件)。
)@error/delegate.c/ExternalDelegateCommand/475…我在服务器中找不到本地/temp/.文件夹,但

您好,您解决了吗?如果是,如何解决?如果是,如何解决?
 string rawpath = _hostingEnvironment.WebRootPath + "\\GhostScriptDll"
            MagickNET.SetGhostscriptDirectory(rawpath);
            MagickReadSettings settings = new MagickReadSettings();
            settings.Density = new Density(300, 300);
            List<string> intList = new List<string>() { };
            using (MagickImageCollection images = new MagickImageCollection())
            {
                images.Read($"{rawFileLocation}{model.OriginalDocName}", settings);
                int page = 1;
                string tempName = "";
                foreach (MagickImage image in images)
                {
                    tempName = System.IO.Path.GetRandomFileName().Replace(".", string.Empty) + "_processed_" + page + ".png";
                    image.Write($"{processedFileLocation}{tempName}");
                    intList.Add(tempName);
                    page++;
                }
            }