我的 iis 服务正在调用控制台应用程序。此控制台应用程序引用 DLL。
当我检查错误输出时,我得到了这个:
无法加载文件或程序集 'file:///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();
}