none
wsDualHttpBinding绑定,提示:打开操作没有在分配的超时00:01:00内完成。分配给该操作的时间可能是更长超时的一部分。 RRS feed

  • 问题

  • 服务器端配置如下:
      <system.serviceModel>
        <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
        <services>
          <service behaviorConfiguration="TransitionServiceBehavior" name="TransitionService">
            <endpoint address="" binding="wsDualHttpBinding" contract="ITransitionService" />
            <host>
              <baseAddresses>
                <add baseAddress="http://192.168.0.190:9006/TransitionService" />
              </baseAddresses>
            </host>
          </service>
        </services>
        <behaviors>
          <serviceBehaviors>
            <behavior name="TransitionServiceBehavior">
              <serviceMetadata httpGetEnabled="true" />
              <serviceDebug includeExceptionDetailInFaults="false" />
            </behavior>
          </serviceBehaviors>
        </behaviors>
        <bindings>
          <wsDualHttpBinding>
            <binding name="WSDualHttpBinding_ITransitionService" closeTimeout="00:01:00"
                openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
                bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
                maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
                messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true">
              <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                  maxBytesPerRead="4096" maxNameTableCharCount="16384" />
              <reliableSession ordered="true" inactivityTimeout="00:10:00" />
              <security mode="None">
                <message clientCredentialType="Windows" negotiateServiceCredential="true" />
              </security>
            </binding>
          </wsDualHttpBinding>
        </bindings>
      </system.serviceModel>

    客户端配置如下:
      <system.serviceModel>
        <bindings>
          <wsDualHttpBinding>
            <binding name="WSDualHttpBinding_ITransitionService" closeTimeout="00:01:00"
                openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
                bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
                maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
                messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true">
              <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                  maxBytesPerRead="4096" maxNameTableCharCount="16384" />
              <reliableSession ordered="true" inactivityTimeout="00:10:00" />
              <security mode="None">
                <message clientCredentialType="Windows" negotiateServiceCredential="true" />
              </security>
            </binding>
          </wsDualHttpBinding>
        </bindings>
        <client>
          <endpoint address="192.168.0.190:9006/TransitionService"
             binding="wsDualHttpBinding" bindingConfiguration="WSDualHttpBinding_ITransitionService"
             contract="ITransitionService" name="WSDualHttpBinding_ITransitionService" />
        </client>
      </system.serviceModel>

    目前情况是这样,我以Windows服务方式来启动WCF服务,当部署在我本机时调试通过,但当我把Windows服务部署到服务器上时就出现:
    打开操作没有在分配的超时00:01:00内完成。分配给该操作的时间可能是更长超时的一部分。
    请问这什么原因?

    2010年1月25日 8:39

答案

  • Windows服务不方便调试,看不到异常消息。 你可以先创建一个SelfHost service 放到服务器上测试, 或者把WCF Trace 打开,记录一下异常信息。这样有助于你发现错误原因。
    Mog Liang
    • 已标记为答案 Mog Liang 2010年2月1日 8:39
    2010年1月27日 7:14