从MVC运行.EXE [英] Running .EXE from MVC

查看:659
本文介绍了从MVC运行.EXE的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的code本地工作,但不是当我部署到我的Web服务器。它说,权限被拒绝,试图访问 wkhtmltopdf.exe 文件时。我现在用的<一个href=\"https://github.com/codaxy/wkhtmltopdf/blob/master/NuGet/Codaxy.WkHtmlToPdf/content/PdfConvert.cs\"相对=nofollow> Codaxy包装。

My code works locally, but not when I deploy to my web server. It says, "Permission Denied," when trying to access the wkhtmltopdf.exe file. I am using the Codaxy Wrapper.

WkHtmlToPdfPath = HttpContext.Current.Server.MapPath(@"~/wkhtmltopdf/wkhtmltopdf.exe"),

我能更改使用DLL或东西吗?我怎样才能让服务器上的这项工作就像在本地使用?

Could I change that to using a DLL or something? How can I make this work on the server like it works locally?

推荐答案

您需要授予的.exe文件到用户执行访问IIS将使用访问该文件,最有可能的应用程序池标识或IIS 6 IIS_WPG用户。

You need to grant execute access on the .exe file to the user IIS is going to use to access the file, most likely the app pool identity or in IIS 6 the IIS_WPG user.

好运气

-Tessi

这篇关于从MVC运行.EXE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆