Reputation: 7197
I have a MVC project inside VS 2015. I would like to run phantomjs.exe, which is saved in bin directory. This same code works fine inside windows application. It doesn't work inside MVC app (as said, my MVC app runs inside IIS express). Nothing happens, no exception, nothing. If I try to call methods on driver, they are not working. And also, console window is not showing when phantomjs.exe is being called. I've granted permissions to 'Everyone' - full control on that .exe.
PhantomJSOptions options = new PhantomJSOptions();
PhantomJSDriver driver = new PhantomJSDriver(options); //at that point, console window should open, but nothing happens
Does anyone has experience of running executables from MVC application?
Upvotes: 0
Views: 3461
Reputation: 9289
When you call a EXE on your windows server you are calling the exe from the user explained in this user What are all the user accounts for IIS/ASP.NET and how do they differ?
you can simply put exe in your bin and upload it on the server. call the exe through the code and it will be called from the asp.net account.
someone suggested embedded resource approach. for following that approach you can try this https://stackoverflow.com/a/15470314/713789
Upvotes: 0