title: RedirectToAction not working as expected
body: <p>I have a simple MVC3 application that I want to retrieve some configuration details from a service, allow the user to edit and save the configuration. </p>
  
  <p>If any errors are detected during the saving process, these are to be returned and reported back to the user.</p>
  
  <p>The problem is that the configuration containing the errors is failing to be called and the currently saved values are just being redisplayed.</p>
  
  <p>Stepping through the code, when errors are detected, it should redirect to itself using the passed config object but it doesn't and uses the method with no parameter.</p>
  
  <p>Can anyone see where I'm going wrong?</p>
  
  <p>Below are the two controller methods that are being called:</p>
  
  <pre><code>//
  // GET: /Settings/Edit/
      public ActionResult Edit()
  {
      SettingsViewModel config = null;
  
      // Set up a channel factory to use the webHTTPBinding
      using (WebChannelFactory&lt;IChangeService&gt; serviceChannel =
          new WebChannelFactory&lt;IChangeService&gt;(new Uri(baseServiceUrl)))
      {
          // Retrieve the current configuration from the service for editing
          IChangeService channel = serviceChannel.CreateChannel();
          config = channel.GetSysConfig();
      }
  
      ViewBag.Message = "Service Configuration";
  
      return View(config);
  }
  
  //
  // POST: /Settings/Edit/
  [HttpPost]
  public ActionResult Edit( SettingsViewModel config)
  {
      try
      {
          if (ModelState.IsValid)
          {
              // Set up a channel factory to use the webHTTPBinding
              using (WebChannelFactory&lt;IChangeService&gt; serviceChannel = new WebChannelFactory&lt;IChangeService&gt;(new Uri(baseServiceUrl)))
              {
                  IChangeService channel = serviceChannel.CreateChannel();
                  config = channel.SetSysConfig(config);
  
                  // Check for any errors returned by the service
                  if (config.ConfigErrors != null &amp;&amp; config.ConfigErrors.Count &gt; 0)
                  {
                      // Force the redisplay of the page displaying the errors at the top
                      return RedirectToAction("Edit", config);
                  }
              }
          }
  
          return RedirectToAction("Index", config);
      }
      catch
      {
          return View();
      }
  }
  </code></pre>