title: How to start the bat-file at Asp.net web server side?
body: <p>I need to call a console application to load data into another desktop application on the remote server that located within the corporate domain.</p>
  
  <p>Users will enter the web page and upload data to asp.net web server, which after transformation should call that console application. Users are located remotely and do not have any other access except the web server.</p>
  
  <p>I decided to lower the security web application context and let the asp.net working process to start the console application on the current IIS 6.0 web server</p>
  
  <p>What I have done:</p>
  
  <ul>
  <li>I changed the security account for the application pool for Local System;</li>
  <li>I added ASPNET Account and IIS_WPG IIS Process Account to Administrators group;</li>
  <li>I added “Allow service to interact with desctop” for “IIS Admin Service” and “World Wide Web Publishing Service” processes and restarted the machine;</li>
  </ul>
  
  <p>I tried to start BAT-file at server side through the test page code-behind, but failed:</p>
  
  <pre><code>protected void btnStart_Click(object sender, EventArgs e)
  {
      Process process = new Process(); 
      process.StartInfo.FileName = @”C:\run.bat”; 
      process.StartInfo.UseShellExecute = false;
      process.Start();
      process.WaitForExit();  
  }
  </code></pre>
  
  <p>The error was <code>access denied.</code> </p>
  
  <p>Please help me to find any workable idea how to start the bat-file at web server side.
  Thanks</p>