title: Batch file not working in server but working local
body: <p>I created a batch file in my asp.net web site, It is working within the local system without any problem. After I was upload it to my web site's server (shared server), it is not working in the remote environment.</p>
  
  <p>Here is a screenshot of the error I'm receiving  <img src="https://i.stack.imgur.com/mFyE9.jpg" alt="Server Error in &#39;/&#39; Application"></p>
  
  <p>This is the code I'm using to test run the batch on the server.</p>
  
  <pre><code>    string path = Server.MapPath("~/SourceCode/Jsil");
      Response.Write(path+"&lt;br&gt;");
      string batpath=Server.MapPath("~/Dir.bat");
      string framework = Server.MapPath("~/SourceCode/v4.0.30319");
      string vscompiler = @"\csc.exe /t:exe /r:JSIL.dll;JSIL.Meta.dll Program.cs";
      string full = framework + vscompiler;
      Response.Write(full);
      StreamWriter file = new StreamWriter(batpath);
      file.WriteLine("G:");
      file.WriteLine("cd " + path);
      file.Write(full);
      file.Close();
      //Excecute bat file
      System.Diagnostics.Process compile = new System.Diagnostics.Process();
      compile.StartInfo = new ProcessStartInfo(batpath);
      compile.Start();
      compile.Close();
  </code></pre>