Question: Every time I try to use the new `Async` and `Await` operators and return a collection of objects from a database I get an `Invalid Operation` exception. When I use it to only return a single Item it works fine.

Controller Code:

```
public async Task<ActionResult> EnvironmentList()
{
    EfEnvironmentDataAccess dataAccess = new EfEnvironmentDataAccess();
    ICollection<Environment> environments = await dataAccess.GetAllEnvironmentsAsync();
    return PartialView(environments);
}

```

View Code:

```
<div class="ECURightCol">
<h3>Table Dumps</h3>
@Html.Action("EnvironmentList", "Environment")
@Html.Action("ComputerList", "Computer")
@Html.Action("ProductList", "Product")
@Html.Action("InstanceList", "Instance")
@Html.Action("ProfileList", "Profile")

```

The Data Access Code:

```
public ICollection<Environment> GetAllEnvironments()
{
    using (EcuWebDataContext db = new EcuWebDataContext())
    {
        return db.Environments.OrderBy(e => e.Name).ToList();
    }
}

public async Task<ICollection<Environment>> GetAllEnvironmentsAsync()
{
    return await Task.Run(() => GetAllEnvironments());
}

```

The Error I get is:

> 
> Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
> 
> 
> Exception Details: System.InvalidOperationException: HttpServerUtility.Execute blocked while waiting for an asynchronous operation to complete.
> 
> 
>

Answer: 
It's been a while since this was answered but another way around is as follows:

Call your method from an action

```
@Html.Action("YourSyncMethod", "YourController")

```

Define it as a normal sync action

```
public ActionResult YourSyncMethod()

```

Then inside it call your async method

```
var taskResponse = YourAsyncMethod(); 

```

which will return a model with whatever you need

```
private async Task<YourModel> YourAsyncMethod()

```

It seems simpler than tampering with config options or creating more complex code
It's been some time since this question was answered. But I was having a similar situation with MVC 5 and I was able to make a [ChildActionOnly] work asynchronously just by commenting out the following line under `<system.web>` section of web.config file.

```
<system.web>
    <!--<httpRuntime targetFramework="4.5" />-->

```

EDIT:
Consider this a workaround while you find a real solution for your situation. Please see Leri's comments below.