user1477388
user1477388

Reputation: 21430

Running .EXE from MVC

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?

Upvotes: 1

Views: 5902

Answers (1)

tessi
tessi

Reputation: 179

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.

Upvotes: 4

Related Questions