我的iis服務正在調用控制檯應用程序。該控制檯應用程序引用一個DLL。從IIS Web服務調用控制檯應用程序,不加載DLL的
當我檢查錯誤輸出我得到這個:
無法加載文件或程序集 '文件:/// C:\ WINDOWS \ SYSTEM32 \ INETSRV \ MYDLL.DLL'
什麼調用可執行正確的方法:
到目前爲止,我已經試過這樣:
using (var p = new System.Diagnostics.Process())
{
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.RedirectStandardError = true;
p.StartInfo.RedirectStandardInput = true;
p.StartInfo.FileName = downloaderPath;
p.Start();
string o = p.StandardOutput.ReadToEnd();
string i = p.StandardError.ReadToEnd();
p.WaitForExit();
}