MVC: Server timeout issue

时间:2016-11-09 08:26:24

标签: c# asp.net asp.net-mvc asp.net-mvc-4

I am developing an application using ASP.NET MVC 5, in which I am trying to call a service hosted on a server from MVC controller. The issue is when the request takes more than 30 seconds to send the response then we get 500 internal server error.

I tried to increase timeout at client as well as server side using the following methods, but nothing worked out.

  1. Increasing http runtime executionTimeout to 300 seconds. <httpRuntime executionTimeout="300" targetFramework="4.5" /> in web.config

  2. Setting ScriptTimeout to more than 30 seconds in MVC controller

    public JsonResult SendMeeting()
    {
        Server.ScriptTimeout = 300;
    }
    
  3. I also tried to increase the idle timeout settings for an application pool in IIS7.

I also checked the load balancer timeout, it is set to 300 seconds which is far more than 30 seconds.

0 个答案:

没有答案