wuyunlong0525 2017-11-23 07:38 采纳率: 0%
浏览 1789
已结题

WCF 客户端报报出异常,操作超时,请各位大神帮忙解答

2017-11-22 09:37:40.992__ 发送到 net.tcp://localhost:2004/ScheduleService/ 的请求操作在配置的超时(00:01:00)内未收到回复。分配给此操作的时间可能已经是更长超时的一部分。这可能由于服务仍在处理操作或服务无法发送回复消息。请考虑增加操作超时(将通道/代理转换为 IContextChannel 并设置 OperationTimeout 属性)并确保服务能够连接到客户端。

Server stack trace:
在 System.ServiceModel.Dispatcher.DuplexChannelBinder.SyncDuplexRequest.WaitForReply(TimeSpan timeout)
在 System.ServiceModel.Dispatcher.DuplexChannelBinder.Request(Message message, TimeSpan timeout)
在 System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
在 System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
在 System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:
在 System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
在 System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
在 Automation.ScheduleService.IScheduleService.CheckCarrierId(String carrierid)
在 Automation.ScheduleService.ScheduleServiceClient.CheckCarrierId(String carrierid) 位置 c:\Users\SCH\Desktop\Automation\Automation\Service References\ScheduleService\Reference.cs:行号 581
在 Automation.Form1.S3F17_CarrierCMD(Int32 ulSystemBytes, Object RawData) 位置 c:\Users\SCH\Desktop\Automation\Automation\Form1.cs:行号 2149

 WCF Server 端配置
 <services>
  <service name="Schedule.WCFInterface.ScheduleService">
    <endpoint address="" binding="netTcpBinding" bindingConfiguration="netTcpBindConfig" contract="Schedule.WCFInterface.IScheduleService">
      <identity>
        <dns value="localhost" />
      </identity>
    </endpoint>
    <endpoint address="net.tcp://localhost:2014/ScheduleService/" binding="mexTcpBinding" contract="IMetadataExchange" />
    <host>
      <baseAddresses>
        <add baseAddress="net.tcp://localhost:2004/ScheduleService/" />
      </baseAddresses>
    </host>
  </service>
</services>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
<bindings>
  <netTcpBinding>
    <binding name="netTcpBindConfig" closeTimeout="00:30:00" openTimeout="00:30:00" receiveTimeout="00:30:00" sendTimeout="00:30:00" transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions" hostNameComparisonMode="StrongWildcard" listenBacklog="10" portSharingEnabled="true" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647">
      <reliableSession enabled="true" inactivityTimeout="00:02:00" />
      <security mode="None" />
    </binding>
  </netTcpBinding>
</bindings>

    客户端配置
     <behaviors>
  <serviceBehaviors>
    <behavior name="">
      <serviceMetadata httpGetEnabled="false" httpsGetEnabled="false" />
      <serviceDebug includeExceptionDetailInFaults="true" />
    </behavior>
  </serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
<bindings>
  <netTcpBinding>
    <binding name="NetTcpBinding_IScheduleService">
      <reliableSession inactivityTimeout="00:02:00" enabled="true" />
      <security mode="None" />
    </binding>
  </netTcpBinding>
</bindings>
<client>
  <endpoint address="net.tcp://localhost:2004/ScheduleService/"
    binding="netTcpBinding" bindingConfiguration="NetTcpBinding_IScheduleService"
    contract="ScheduleService.IScheduleService" name="NetTcpBinding_IScheduleService">
    <identity>
      <dns value="localhost" />
    </identity>
  </endpoint>
</client>
  • 写回答

2条回答 默认 最新

  • 哈喽boy 2017-11-23 08:02
    关注

    可能是电脑中毒,你用360试试

    评论

报告相同问题?

悬赏问题

  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 matlab求解平差
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料
  • ¥15 使用R语言marginaleffects包进行边际效应图绘制
  • ¥20 usb设备兼容性问题
  • ¥15 错误(10048): “调用exui内部功能”库命令的参数“参数4”不能接受空数据。怎么解决啊
  • ¥15 安装svn网络有问题怎么办