Running an MVC web site that calls a WCF service.
Site and service on 2 different machines.
.NET framework 4; IIS 7.
Production site is encountering a timeout when it should not. I created the simplest samples I could (simple web site that calls service method that returns "hi mom" after a delay) and was able to reproduce the problem. Here is how it goes:
So here is the pertinent config section of the client:
<binding name="BasicHttpBinding_IService1"
closeTimeout="00:6:00"
openTimeout="00:6:00"
receiveTimeout="00:6:00"
sendTimeout="00:6:00"
allowCookies="false"
bypassProxyOnLocal="false"
hostNameComparisonMode="StrongWildcard"
maxBufferSize="2147483647"
maxBufferPoolSize="2147483647"
maxReceivedMessageSize="2147483647"
messageEncoding="Text"
textEncoding="utf-8"
transferMode="Buffered"
useDefaultWebProxy="true">
<httpRuntime executionTimeout="1200"
maxRequestLength="10240" />
<serviceBehaviors>
<behavior>
<serviceTimeouts transactionTimeout="00:6:00" />
</behavior>
</serviceBehaviors>
The same values are present on the server. Following include things I've tried:
What else can I try?
[Edit] Moved the service to the same machine as the web app and the problem goes away.
It was HTTP policy on firewall in production environment: max request time 5 minutes.