Home > database >  Call executable on IIS 10 with exit code -1073741819
Call executable on IIS 10 with exit code -1073741819

Time:04-21

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();

CodePudding user response:

-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.

  • Related