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.
Increasing http runtime executionTimeout to 300 seconds.
<httpRuntime executionTimeout="300" targetFramework="4.5" />
in web.config
Setting ScriptTimeout to more than 30 seconds in MVC controller
public JsonResult SendMeeting()
{
Server.ScriptTimeout = 300;
}
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.