Running .EXE from MVC

穿精又带淫゛_ 提交于 2020-01-05 04:25:13

问题


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"),

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


回答1:


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.



来源:https://stackoverflow.com/questions/15285363/running-exe-from-mvc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!