我的WCF是否使用了正确的绑定?

我的WCF是否使用了正确的绑定?,wcf,binding,web-config,Wcf,Binding,Web Config,我的wcf服务的web.config如下所示: 如何确认它正确使用了设置 即使我已将绑定配置为使用,有时仍会出现此超时错误: 发送超时=10分钟等 我的客户端windows service app.config看起来像: <system.serviceModel> <bindings> <basicHttpBinding> <binding name="BasicHttpBinding_IMyService" clos

我的wcf服务的web.config如下所示:

如何确认它正确使用了设置


即使我已将绑定配置为使用,有时仍会出现此超时错误: 发送超时=10分钟等

我的客户端windows service app.config看起来像:

<system.serviceModel>
    <bindings>
      <basicHttpBinding>
        <binding name="BasicHttpBinding_IMyService" closeTimeout="00:01:00"
          openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
          allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
          maxBufferSize="65536" maxBufferPoolSize="1048576" maxReceivedMessageSize="67108864"
          messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
          useDefaultWebProxy="true">
          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
            maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <security mode="None">
            <transport clientCredentialType="None" proxyCredentialType="None"
              realm="" />
            <message clientCredentialType="UserName" algorithmSuite="Default" />
          </security>
        </binding>
      </basicHttpBinding>
    </bindings>
    <client>
      <endpoint address="http://local/MyService/MyService.svc"
        binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IMyService"
        contract="MyService.IMyService" name="BasicHttpBinding_IMyService" />
    </client>
  </system.serviceModel>

尝试在客户端配置中设置超时值。

如果将客户端中的sendTimeout设置为10分钟会怎么样?

有时我仍然会遇到此超时错误。。。哪个超时错误?当你尝试连接时,到底发生了什么?你拥有客户吗?我拥有客户是的。我的错误日志显示了一条错误消息,如:请求通道在00:01:00之后等待答复时超时…请同时发布您的客户端配置。Terry,我也发布了客户端配置。看起来我需要更改那里的设置…是的-尝试一下,如果有效,请告诉我们答案!:
<system.serviceModel>
    <bindings>
      <basicHttpBinding>
        <binding name="BasicHttpBinding_IMyService" closeTimeout="00:01:00"
          openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
          allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
          maxBufferSize="65536" maxBufferPoolSize="1048576" maxReceivedMessageSize="67108864"
          messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
          useDefaultWebProxy="true">
          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
            maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <security mode="None">
            <transport clientCredentialType="None" proxyCredentialType="None"
              realm="" />
            <message clientCredentialType="UserName" algorithmSuite="Default" />
          </security>
        </binding>
      </basicHttpBinding>
    </bindings>
    <client>
      <endpoint address="http://local/MyService/MyService.svc"
        binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IMyService"
        contract="MyService.IMyService" name="BasicHttpBinding_IMyService" />
    </client>
  </system.serviceModel>