在多线程环境中处理大量http请求的最佳方法是什么?
发布于 2016-02-13 02:09:04
步骤3:在web服务器上处理请求。有很多方法可以做到这一点。这就是使用asp.net web来实现它的方法。
下面是第二步。
我想这就是你想要的:
Process myProcess = new Process();
try
{
myProcess.StartInfo.UseShellExecute = false;
// You can start any process, HelloWorld is a do-nothing example.
myProcess.StartInfo.FileName = "C:\\HelloWorld.exe";
myProcess.StartInfo.Arguments = "your arguments go here";
myProcess.StartInfo.CreateNoWindow = true;
myProcess.Start();
// This code assumes the process you are starting will terminate itself.
// Given that is is started without a window so you cannot terminate it
// on the desktop, it must terminate itself or you can do it programmatically
// from this application using the Kill method.
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}您可以在这里阅读有关Process类的更多信息:
https://msdn.microsoft.com/en-us/library/system.diagnostics.process(v=vs.110).aspx
https://stackoverflow.com/questions/35374752
复制相似问题