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.
这是生产环境中防火墙上的HTTP策略:最长请求时间为5分钟。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.