title: Getting "This site can’t be reached" from remote server
body: <p>I have a .NET MVC project and I'm trying to download a file from temporary folder. Here is my view code:</p>
  
  <pre><code>window.open('@Url.Action("DownloadDocument", "Controller")?fileName=' + fileName, '_blank');
  </code></pre>
  
  <p>And here is my controller code:</p>
  
  <pre><code>    public FileResult DownloadDocument(string fileName)
      {
          string path = Web.Common.Properties.Settings.Default.TempDocPath + "OpenTable\\";
          if (!Directory.Exists(path))
          {
              Directory.CreateDirectory(path);
          }
  
          return File(fileName, "application/xml", fileName + ".xml");
      }
  </code></pre>
  
  <p>This code works on IIS and file is being downloaded. But I'm getting 500 error when trying to download it from remote server. </p>
  
  <blockquote>
    <p><strong>This site can’t be reached</strong>
    The webpage at &lt;...> might be temporarily down or it may have moved permanently to a new web address.
    ERR_INVALID_RESPONSE</p>
  </blockquote>
  
  <p>And the worst part is that there are some almost exact code snippets in the system which are working in both IIS and remote server. </p>
  
  <p>Any suggestions what could be done?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>Good news. When I tried postman it threw a file not found error with wrong path. It's an easy fix: </p>
  
  <pre><code>return File(Path.Combine(path, fileName), "application/xml", fileName + ".xml");
  </code></pre>
  
  <p>So it puzzles me... How and why it was working locally on IIS with wrong path?</p>