title: When using Razor Pages, How can I use RedirectToPage to transfer the contents of an IFormFile?
body: <p>Here's the scenario, I have a 'Index' Razor Page that asks the user for an IFormFile.  The user clicks, and selects a file to upload.</p>
  
  <p>In the OnPostAsync method, I read this large text file (200K+) and want to send the results to the next Razor Page for processing.</p>
  
  <pre><code>return RedirectToPage("ConsolidationReport", new {fileContents});
  </code></pre>
  
  <p>But that just gives us a size limit error</p>
  
  <blockquote>
    <p>HTTP Error 502.3 - Bad Gateway An internal response header size limit
    was exceeded</p>
  </blockquote>
  
  <p>Trying to redirect the IFormFile doesn't work either.</p>
  
  <pre><code>return RedirectToPage("ConsolidationReport", new { report = Input.InquiriesReport });
  </code></pre>
  
  <p>There's no error, but the receiving OnGet has null.</p>
  
  <p>And if I process the data and generate the output before redirecting, I get</p>
  
  <blockquote>
    <p>HTTP Error 404.15 - Not Found The request filtering module is
    configured to deny a request where the query string is too long.</p>
  </blockquote>
  
  <p>So, what's the correct approach for this?  I'm looking for best practice guidance.</p>
  
  <p>Should I read the file, and create a new IFormFile to send to my target page?  Should I raise the limit of all my requests?
  Store in temporary storage?</p>
  
  <p>Thanks everyone!</p>