在IIS 10上致电带有退出代码-1073741819的可执行文件

发布于 2025-01-22 15:29:30 字数 663 浏览 3 评论 0原文

我想从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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

屋檐 2025-01-29 15:29:30

-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 gave full rights for the user of the application pool in the folder

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文