WCF 采用wsDualHttpBinding,服务端配置代码如下:
<system.serviceModel> <behaviors> <serviceBehaviors> <behavior name="serviceMetadataBehavior"> <serviceMetadata httpGetEnabled="true"/> <serviceDebug includeExceptionDetailInFaults="true"/> </behavior> </serviceBehaviors> </behaviors> <bindings>
<wsDualHttpBinding>
<binding name="wsDualHttpBinding_SessionService">
<security mode="None">
<message clientCredentialType="None" negotiateServiceCredential="false"/>
</security>
</binding>
</wsDualHttpBinding>
</bindings> <services> <service name="Zwj.TEMS.Service.SessionManagementService" behaviorConfiguration="serviceMetadataBehavior"> <endpoint address="" binding="wsDualHttpBinding" contract="Zwj.TEMS.Service.Contract.ISessionManagement" bindingConfiguration="wsDualHttpBinding_ISessionManagement" ></endpoint> <host> <baseAddresses> <add baseAddress="http://192.168.1.210:10800/SessionService"></add> </baseAddresses> </host> </service>
当在客户端连接时,报如下错误:
打开操作没有在分配的超时 00:00:59.9969998 内完成。分配给此操作的时间可能已经是更长超时的一部分。
竟然还有用wcf 的傻子
不用WCF,那用什么,还请指教!
@梦在旅途: 直接 http get, post
WCF支持回调调用客户端,APi则轻量,简单,简易部署,各有所长,不知道答案就少bb
是设置超时时间了吗,去掉超时时间试试呢