title: TempData is empty after RedirectToAction in catch block. What could be the reason?
body: <p>I've been using TempData for a long time and faced strange issue for me. I have basic scenario:</p>
  
  <pre><code>[HttpPost]
  public ActionResult Create(ProductCreateModel newProduct)
  {
      // create and save product to db
  
      // try upload product to external site
      try { UploadProductToEbay(newProduct); } 
      catch { 
                TempData["error"] = "error";
                return RedirectToAction("Edit", newProduct.Id);
      }
      ...
  }
  
  [HttpGet]
  public ActionResult Edit(int Id)
  {
      var error = TempData["error"]; // at this point temp data collection is empty and have no idea why
      ...
  }
  </code></pre>
  
  <p>The issue takes place when upload fails and <code>return RedirectToAction("Edit", newProduct.Id);</code> line is executed. What could be not very obvious reasons of losing temp data values?</p>
  
  <p><strong>UPDATE:</strong> 
  When I use </p>
  
  <pre><code>TempData["error"] = "error";
  RedirectToAction(...);
  </code></pre>
  
  <p>outside the <code>catch</code> block everything works fine, temp data value is transfered to <code>Edit</code> action.</p>