title: ASP.NET MVC in IIS, RedirectToAction() and Redirect()
body: <p>I am working with ASP.NET MVC 4 using Visual Studio 2015 community edition, and IIS 8.. I am beginner in this technology..</p>
  
  <p>I created login page,
  In my Login controller (action Index), I put <code>return RedirectToAction("Index", "Home")</code> to redirect the page when users enter correct username and password.. it works when I debug/run it in visual studio environment.. but when I publish it (let say the name is MyPublishedWeb), create application in IIS, and browse it, the URL will look like this: <code>localhost/MyPublishedWeb/Login/Index</code></p>
  
  <p>The problem is when I login succesfully, it redirects me to <code>localhost/Home/Index</code>, instead of <code>localhost/MyPublishedWeb/Home/Index</code>, and it gives error..</p>
  
  <p>But when I change <code>RedirectToAction()</code> to <code>Redirect()</code>, it works both in visual studio environment and IIS..</p>
  
  <p>What do I miss?
  Why <code>RedirectToAction()</code> doesn't work in IIS application?</p>