我想從 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();
uj5u.com熱心網友回復:
-1073741819 是0xC0000005,這意味著ERROR_ACCESS_DENIED。IIS 沒有呼叫 .exe 檔案的權限。
我為檔案夾中的應用程式池的用戶授予了完全權限
我不知道你是怎么做的。但最好添加IIS APPPOOL\pool name檔案夾安全屬性并將其設定為完全控制權限。
如果還是報這個錯誤,請嘗試更改應用池標識。管理員擁有最高權限,嘗試將身份更改為管理員。
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/461973.html
上一篇:《Redis設計與實作》
