title: Copy file to remote location throws network path not found intermittently
body: <p>I am trying to copy a file generated (Excel file) by my c# code into a remote network path to which I have access as below:</p>
  
  <pre><code>string folder = "\\\\testing-path\\Audit\\Reports";
  if (!(Directory.Exists(folder + "\\" + DateTime.Now.ToString("MM-dd-yyyy") + "\\" + "Audit")))
  {
      Directory.CreateDirectory(folder + "\\" + DateTime.Now.ToString("MM-dd-yyyy") + "\\" + "Audit");
  }
  folder = folder + "\\" + DateTime.Now.ToString("MM-dd-yyyy") + "\\" + "Audit";
  
  if (File.Exists(folder + "\\Audit- " + fname + ".xlsx"))
  {
      File.Delete(folder + "\\Audit- " + fname + ".xlsx");
  }
  string fileName = folder + "\\Audit- " + fname + ".xlsx";
  wb.SaveAs(fileName,
      Excel.XlFileFormat.xlWorkbookDefault, null, null,
      false, false, Excel.XlSaveAsAccessMode.xlNoChange,
      null, null, null, null, null);
  </code></pre>
  
  <p>This code works perfectly fine 8/10 times and throws network error (Network path not found) other 2 times. When the remote path throws this error I open the above remote path using run command on the machine I run this code and I am able to access it as normal. Closing the folder opened manually and re-running the code is solving the issue. What could be the issue? Am I doing something wrong here?</p>
  
  <p>PS: I also tried to save the excel file onto desktop and then use <code>File.Copy</code> and there is no change to this intermittent behaviour. </p>