Question: So I saw [this question](https://stackoverflow.com/q/3573554/186643) here on SO, but it hasn't really solved this problem for me.

I have an ASP.NET MVC 3 + Razor app running on IIS5 on my dev pc, and then IIS6 for my dev web server. Everything worked great until I deployed it. I am bin deploying everything, with no problems on that front (that I can tell).

Now I am getting this **Child actions are not allowed to perform redirect actions** error on my page. I am not sure how to pinpoint where it is failing.

I'm using @Html.Action to pull in some drop down boxes with data:

```
    public ActionResult Hierarchy()
    {
        List<Store> storeList = DBService.getStores();            
        if (DBService.Error != null)
            return RedirectToError(DBService.Error);

        List<Department> deptList = DBService.getDepts();
        if (DBService.Error != null)
            return RedirectToError(DBService.Error);

        VM_Hierarchy hierarchy = new VM_Hierarchy(storeList, deptList);

        return View(hierarchy);
    }

```

If I remove the @Html.Action line, the page will render. It will then break if I do an AJAX request to a controller action such as this:

```
    [HttpPost]
    public ActionResult InventoryList(string fromDate, string toDate)
    {
        List<Inventory> inventories = DBService.getInventories(fromDate, toDate);

        if (DBService.Error != null)
            return RedirectToAction("Error");

        return View(inventories);
    }

```

If this isn't correct, how am I supposed to redirect to an error page or dictate what view gets returned on a post? Any help is appreciated. Thanks.

Answer: 
if you put in the child action 
 `(ControllerContext.ParentActionViewContext.Controller as System.Web.Mvc.Controller).Response.Redirect(Url.Action("Action", "Controller"));` it will redirect from the childaction.
I had a similar problem but for the life of me, I couldn't figure out where the redirection was coming from. Once I figured it out, I thought I'd post an answer in case it happens to anyone else.

If the source of the redirection is not apparent from the imperative code, e.g.:

```
    [AuthoriseThis]
    public ActionResult Details(SomethingModel something)
    {
        return PartialView(something);
    }

```

Look at the declarative code!

In my case, it was an authorisation problem, so the attribute was causing the redirection, and my eyes were filtering out the existence of the attribute.