Error executing child request for handler in view

后端 未结 12 919
臣服心动
臣服心动 2020-12-09 02:30

I have an MVC 4 view where I render the following actions

@{
    Html.RenderAction(\"Index\", \"Logo\");
    Html.RenderAction(\"Index\", \"MainMenu\");
}
         


        
12条回答
  •  失恋的感觉
    2020-12-09 03:13

    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.

提交回复
热议问题