我双击mysolver.exe文件,可以得到正确的结果, 可是我用下列程序连接mysolver.exe这个文件,
Process.Start("C:/Inetpub/wwwroot/Webinterface/bin/Release/mysolver.exe");
就报错!
An exception 'System.NullReferenceException' has occured in mysolver.exe
请问高手有可能哪里出问题了,请指教!谢谢了(不是路径的问题!)

解决方案 »

  1.   

    Process p2 = new Process();
    p2.StartInfo.FileName = "mysolver.exe";
    p2.StartInfo.Verb = "Open";
    p2.StartInfo.WorkingDirectory = @"C:/Inetpub/wwwroot/Webinterface/bin/Release";
    // p2.StartInfo.UseShellExecute = false;
    // p2.StartInfo.RedirectStandardInput = true;
    // p2.StartInfo.RedirectStandardOutput = true;
    // p2.StartInfo.CreateNoWindow = true;
    p2.Start();
      

  2.   

    Process pr = new Process();
    pr.StartInfo.FileName = "mysolver.exe";
    pr.StartInfo.Verb = "Open";
    pr.StartInfo.WorkingDirectory = @"C:\Inetpub\wwwroot\Webinterface\bin\Release\";pr.Start();