I have copied the following code from Wrox Professional ASP.NET 4.0 MVC 4 book, page 179 (Chapter \"Understanding the Security Vectors in a Web Application\") w
The compiler expects the same return type in a conditional statement, so it expects both of these to be the same type. If you cast the options to ActionResult, it will work. You may be able to get along with the compiler by only casting the last one.
return (Url.IsLocalUrl(returnUrl)) ? (ActionResult)Redirect(returnUrl) : (ActionResult)RedirectToAction("Index", "Home");