首页 新闻 赞助 找找看

WCF错误

0
悬赏园豆:20 [已关闭问题] 关闭于 2008-09-22 17:30

最近一个项目使用WCF,常发生如下错误,大家有没有碰到,这么解决这个问题。

System.ServiceModel.CommunicationException: The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '10675199.02:48:05.4775807'. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
   --- End of inner exception stack trace ---
   at System.ServiceModel.AsyncResult.End[TAsyncResult](IAsyncResult result)
   at System.ServiceModel.Channels.FramingDuplexSessionChannel.EndTryReceive(IAsyncResult result, Message& message)
   at System.ServiceModel.Dispatcher.DuplexChannelBinder.EndTryReceive(IAsyncResult result, RequestContext& requestContext)
   at System.ServiceModel.Dispatcher.ErrorHandlingReceiver.EndTryReceive(IAsyncResult result, RequestContext& requestContext)

问题补充: 配置文件如下: <system.serviceModel> <services> <service name="Tencent.OA.RightWay.WinServiceHost.RightService" behaviorConfiguration="Tencent.OA.RightWay.WinServiceHost.Service1Behavior" > <host> <baseAddresses> <add baseAddress = "net.tcp://192.168.1.112:8888/RightObject/" /> </baseAddresses> </host> <endpoint address ="" bindingConfiguration="rightTcpBinding" binding="netTcpBinding" contract="Tencent.OA.Right.Common.Interface.IRight"> </endpoint> </service> </services> <bindings> <netTcpBinding> <binding name="rightTcpBinding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" listenBacklog="100"> <security mode="None"/> <reliableSession inactivityTimeout ="00:10:00"/> </binding> </netTcpBinding> </bindings> <behaviors> <serviceBehaviors> <behavior name="Tencent.OA.RightWay.WinServiceHost.Service1Behavior"> <serviceDebug includeExceptionDetailInFaults="True" /> <serviceThrottling maxConcurrentCalls="100" maxConcurrentSessions="100" maxConcurrentInstances="100" /> </behavior> </serviceBehaviors> </behaviors> <diagnostics> <messageLogging logEntireMessage="true" logMalformedMessages="false" logMessagesAtServiceLevel="true" logMessag
张善友的主页 张善友 | 小虾三级 | 园豆:557
提问于:2008-09-11 16:18
< >
分享
所有回答(4)
0

传过去的参数有问题,或者连接超时了

Gray Zhang | 园豆:17610 (专家六级) | 2008-09-11 17:21
0

看起来,像是超时 '10675199.02:48:05.4775807'. --->

10675199天吗? 好疯狂啊~

 

 

楼主,检查一下2台机器的时间,然后再测试一下看看

G yc {Son of VB.NET} | 园豆:2006 (老鸟四级) | 2008-09-12 16:00
0

超时了吧

zjy | 园豆:3194 (老鸟四级) | 2008-09-12 16:50
0

两端代码都发出来才对,内容太少。

John Wu | 园豆:220 (菜鸟二级) | 2008-09-17 10:43
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册