我在服务器上有一个WCF Web服务。当我尝试从另一台服务器调用此服务时,尽管有web.config
设置,但在20秒后我收到超时异常。
错误讯息:
请求频道在等待回复后超时 00:09:59.8593747
当我尝试从localhost调用此服务时,它没有异常。
客户web.config
:
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IHostOlustur"
receiveTimeout="00:10:00" sendTimeout="00:10:00"
maxReceivedMessageSize="2147483647" />
</basicHttpBinding>
</bindings>
<client>
<endpoint name="BasicHttpBinding_IHostOlustur"
address="...."
binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_IHostOlustur"
contract="Reseller.IHostOlustur" />
</client>
</system.serviceModel>
服务web.config
:
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="">
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="false"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="false"
multipleSiteBindingsEnabled="true"
minFreeMemoryPercentageToActivateService="1"/>
</system.serviceModel>
我认为这与IIS设置有关。