Asp.net mvc 4 http错误404页面加载需要很长时间-EPIServer7

Asp.net mvc 4 http错误404页面加载需要很长时间-EPIServer7,asp.net-mvc-4,http-status-code-404,episerver-7,Asp.net Mvc 4,Http Status Code 404,Episerver 7,我有一个EpiServer7站点,我正在尝试连接一个定制的404页面 I解决方案在本地运行时运行良好。当我部署到登台服务器(站点未上线)时,显示404页面需要2-3分钟。如果我登录到服务器并运行相同的URL,我会立即显示自定义404页面 我在web.config中的条目是(内部): 有什么想法吗?我也有同样的问题,你有自定义路线图吗?比如: protected override void RegisterRoutes(RouteCollection routes) { r

我有一个EpiServer7站点,我正在尝试连接一个定制的404页面

I解决方案在本地运行时运行良好。当我部署到登台服务器(站点未上线)时,显示404页面需要2-3分钟。如果我登录到服务器并运行相同的URL,我会立即显示自定义404页面

我在web.config中的条目是(内部):



有什么想法吗?

我也有同样的问题,你有自定义路线图吗?比如:

 protected override void RegisterRoutes(RouteCollection routes)
 {
        routes.MapRoute("404", "404", 
            new { controller = "ContentPage", action = "NotFound" });

        base.RegisterRoutes(routes);
 }
删除该路线并添加以下“全部覆盖”路线:

protected override void RegisterRoutes(RouteCollection routes)
{
    base.RegisterRoutes(routes);

    routes.MapRoute("Error", "{*url}",
        new { controller = "ContentPage", action = "NotFound" });
}

我遇到了同样的问题,并意识到这是因为epserver.config上的globalErrorHandling。您应该将其设置为“Off”,我猜在您的epserver.config上现在是“RemoteOnly”

希望这有帮助

protected override void RegisterRoutes(RouteCollection routes)
{
    base.RegisterRoutes(routes);

    routes.MapRoute("Error", "{*url}",
        new { controller = "ContentPage", action = "NotFound" });
}