I have an MVC 4 view where I render the following actions
@{
Html.RenderAction(\"Index\", \"Logo\");
Html.RenderAction(\"Index\", \"MainMenu\");
}
>
In my case, I added the following code into Global.asax.cs:
protected void Application_Error(object sender, EventArgs e)
{
var ex = Server.GetLastError();
...
}
Then I added a break point there and see the ex's InnerException is the SQL DB Connection error. So I replaced my Web.config file with my local development one with the correct connection string, and the problem is gone.