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 1
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.
Edit 2
My asp.net mvc application allows users to submit LaTeX
input commands such as $ax^2+bx+c=0$
to be converted to a pdf file rendering an quadratic equation. Behind the scene, this web app will spawn a process executing pdflatex.exe
. The job of pdflatex.exe
is converting the LaTeX
input commands to pdf document.