title: HttpResponse.ClearContent() keeps returning Html
body: <p>I'm Trying to make a downloadable file with corpus my bytes variable. However, even if I try to cancel out the HttpResponse body and header (also trying response.Clear()) this keep me returning what I want (bytes) BUT also the html in the end. Any ideas why this is not working?</p>
  <pre><code>string value = string.Format(&quot;attachment; filename={0}&quot;, fileName); // name of file
  var response = HttpContext.Current.Response;
  response.ContentType = &quot;text/plain&quot;;
  response.ClearContent();
  response.ClearHeaders();
  response.AddHeader(&quot;Content-Disposition&quot;, value);
  response.BinaryWrite(bytes);
  using (var stream = new MemoryStream(bytes))
  {
     stream.WriteTo(response.OutputStream);
  }
  </code></pre>
  <p>I'm following the indications made also in <a href="https://stackoverflow.com/questions/51300334/what-is-httpcontext-current-response">another question</a></p>