title: MVC Controller called again after redirecting to another view
body: <p>I am building an e-commerce application using the <a href="https://www.eway.com.au" rel="nofollow noreferrer">eWay</a> payment portal and I've run into an odd issue.</p>
  
  <p>In my setup for eWay, I am giving a redirect URL for the payment gateway to use to come back to my application. This works correctly and at the end of the callback method I am using <code>RedirectToAction</code> to redirect to a <code>Confirmation</code> view.</p>
  
  <p>However, after the callback method completes, it is called again. Only the second time will the redirect to my confirmation page complete properly.</p>
  
  <p>Looking in Fiddler I appear to get a correct <code>302</code> response from my callback method to my confirmation view, however I get an icon that is the <code>Session was aborted by the client, Fiddler, or the Server</code>. Note that this still occurs when Fiddler is closed.</p>
  
  <p>My callback method:</p>
  
  <pre><code>public ActionResult PurchaseCallback(string accessCode)
  {
      // payment processing
      .....
  
      return RedirectToAction("Confirmation");
  }
  
  public ActionResult Confirmation()
  {
      return View("Confirmation");
  }
  </code></pre>
  
  <p>Fiddler trace:</p>
  
  <p><a href="https://i.stack.imgur.com/jEY9r.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jEY9r.png" alt="enter image description here"></a></p>
  
  <p>Fiddler trace showing request and response headers:</p>
  
  <p><a href="https://i.stack.imgur.com/SAZYV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SAZYV.png" alt="enter image description here"></a></p>
  
  <p>Note the call to <code>/Purchase/Purchase</code> which redirects to the eWay portal, before the tunnel to eWay itself, before returning to <code>Purchase/PurchaseCallback</code> twice before finally arriving at <code>/Purchase/Confirmation</code>. Also note the icon on the first <code>/PurchaseCallback</code> call, which indicates an aborted session. However I don't know why it would be aborted.</p>
  
  <p>There is no associated view for <code>PurchaseCallback</code> and the view for <code>Confirmation</code> has no JavaScript or other requests. I am using IIS Express, but I am using the <code>RedirectToAction</code> pattern in many other places without issue.</p>
  
  <p>What would be causing my controller method to be called twice, and how can I stop it happening?</p>