title: ASP.NET OWIN self hosting console window couldn't start dynamically from a normal ASP.NET Web API Controller
body: <p>I needed to start my OWIN self hosting console application, based on demand. This demand is deciding inside a separate ASP.NET Web API, which is normally hosted under IIS express of VS in a debug mode. But I couldn't prompt the command window from inside this decision making ASP.NET Web API even though no errors received. Below is my testing code to just invoke a command prompt, directly written inside my decision making Web API Controller.</p>
  
  <pre><code> using (Process p = new Process())
                  {
                      // set start info
                      p.StartInfo = new ProcessStartInfo("cmd.exe")
                      {
                          RedirectStandardInput = true,
                          UseShellExecute = false,
                          WorkingDirectory = @"d:\"
                      };
                      // event handlers for output &amp; error
                      p.OutputDataReceived += p_OutputDataReceived;
                      p.ErrorDataReceived += p_ErrorDataReceived;
  
                      // start process
                      p.Start();
                      // send command to its input
                      p.StandardInput.Write("dir" + p.StandardInput.NewLine);
                      //wait
                      p.WaitForExit();
                  }
  </code></pre>
  
  <p>All applications are in same machine. I didn't get any output as of above code running under an ASP.NET MVC controller event hough same code giving me an expected command window if run under a console application.</p>
  
  <pre><code>Is there any restriction to prompt command window under an ASP.NET Web API context?
  </code></pre>