IIS LocalSystem only will run my exe

时光总嘲笑我的痴心妄想 提交于 2020-01-05 08:36:07

问题


IIS on WindowsServer 2012, ASP.NET MVC

It is very bad to run an IIS 8.5 site as LocalSystem, but that is the only way I can get this exe to run. I need to be able to have the site run this:

                var pdfProcess = new Process();
                pdfProcess.StartInfo.FileName =  SomeExeInProgramFiles;
                pdfProcess.StartInfo.Arguments = stuff;
                pdfProcess.StartInfo.WorkingDirectory = docPath; //!!!!This is really important!!!!!
                pdfProcess.Start();

Running windows 2012, how can I let my AppPoolIdentity site run the above exe (only) from Program Files?

I have granted full control to the folder holding the exe to IIS APPPOOL\my pool name as a test, but still it won't run. Only if I set the app pool to run under LocalSystem (yicks)

Note: The EXE is a tool that needs to run to do tasks. We have no other option than to run it on request from the web site. We didn't write or have access to the exe.


回答1:


Try to set the Load User Profile = True in the Application Pools Advanced Settings.

Then I think you should be able to execute the process using the ApplictionPoolIdentity, so you can avoid using the LocalSystem account.



来源:https://stackoverflow.com/questions/26823149/iis-localsystem-only-will-run-my-exe

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