在IIS 10上致电带有退出代码-1073741819的可执行文件
我想从IIS 10中托管的Web应用程序调用可执行文件。
当我在本地运行IIS Express的应用程序时,所有功能都可以正常工作,但是在生产服务器上部署后,我只获取出口代码-1073741819。
在产品服务器上,我为EXE文件所在的文件夹中的应用程序池的用户提供了完整的权利,但这也无法正常工作。
我必须为用户设置其他特殊权利吗?
这是我的代码...
ProcessStartInfo procStartInfo = new ProcessStartInfo(libreExecutable.FullName, argument);
procStartInfo.CreateNoWindow = true;
procStartInfo.UseShellExecute = false;
procStartInfo.WorkingDirectory = workingDirectory;
procStartInfo.RedirectStandardInput = true;
procStartInfo.RedirectStandardOutput = true;
procStartInfo.RedirectStandardError = true;
// This is empty with code -1073741819
process.StandardError.ReadToEnd();
I want to call an executable file from a web application hosted within IIS 10.
When I run my application locally with IIS Express everything works fine, but after deploying on the production server, I only get the exit code -1073741819.
On the product server I gave full rights for the user of the application pool in the folder, where the exe file is located, but that did not work as well.
Do I have to set other, special rights to the user?
This is my code ...
ProcessStartInfo procStartInfo = new ProcessStartInfo(libreExecutable.FullName, argument);
procStartInfo.CreateNoWindow = true;
procStartInfo.UseShellExecute = false;
procStartInfo.WorkingDirectory = workingDirectory;
procStartInfo.RedirectStandardInput = true;
procStartInfo.RedirectStandardOutput = true;
procStartInfo.RedirectStandardError = true;
// This is empty with code -1073741819
process.StandardError.ReadToEnd();
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
-1073741819是
0xc0000005
,这意味着 error_access_denied 。 IIS无权调用.EXE文件。但我不知道您的工作方式。但是最好在文件夹安全属性中添加
iis AppPool \ pool名称
并将其设置为完整的控制权限。如果仍然报告此错误,请尝试更改应用程序池标识。管理员拥有最高的权力,请尝试将身份更改为管理员。
-1073741819 is
0xC0000005
, that means ERROR_ACCESS_DENIED. IIS doesn't have permission to call the .exe file.I don't know how you do. But it is better to add
IIS APPPOOL\pool name
in folder security property and set it full control permission.If it still report this error, please try to change the application pool identity. Administrator has the highest authority, try to change identity to administrator.