How to optimize an asp.net spawning a new process for each request ?
Posted
by
Recycle Bin
on Stack Overflow
See other posts from Stack Overflow
or by Recycle Bin
Published on 2011-03-09T07:31:10Z
Indexed on
2011/03/09
8:10 UTC
Read the original article
Hit count: 295
I have an asp.net mvc application that spawns a Process
as follows:
Process p = new Process();
p.EnableRaisingEvents = true;
p.Exited += new EventHandler(p_Exited);
p.StartInfo.Arguments = "-interaction=nonstopmode " + inputpath;
p.StartInfo.WorkingDirectory = dir;
p.StartInfo.UseShellExecute = false;
p.StartInfo.FileName = "pdflatex.exe";
p.StartInfo.LoadUserProfile = true;
p.Start();
p.WaitForExit();
Before going further, I need to know whether, e.g., pdflatex.exe
is a managed code or a native code?
Edit
I need to consider this because: (Hopely I am not wrong...)
- Each Asp.net application runs in an separate/isolated AppDomain as opposed to a separate/isolated process.
- A native executable cannot live in an AppDomain.
to be continued...
Shortly speaking, I hope my site does not spawn a new process for each request. Because a process is more expensive than an application domain.
© Stack Overflow or respective owner