WCF上最近遇到过这样的问题,怎么也解决不了,望不吝指教:
客户端访问WCF服务,“有时”会出现这样的问题:
-------------------------- start ----------------------------------
Ftrank.Presentation.OrderClient.POrderClient.ClientModel.PException: 服务器没有开启或者存在网络问题,请稍后再试,或联系餐厅服务员员! ---> System.ServiceModel.EndpointNotFoundException: Could not connect to net.tcp://192.168.0.78:8732/ReServer/Service/ServerService/. The connection attempt lasted for a time span of 00:00:20.9843750. TCP error code 10060: 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。 192.168.0.78:8732. ---> System.Net.Sockets.SocketException: 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。 192.168.0.78:8732
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
at System.ServiceModel.Channels.SocketConnectionInitiator.Connect(Uri uri, TimeSpan timeout)
--- End of inner exception stack trace ---
Server stack trace:
at System.ServiceModel.Channels.SocketConnectionInitiator.Connect(Uri uri, TimeSpan timeout)
at System.ServiceModel.Channels.BufferedConnectionInitiator.Connect(Uri uri, TimeSpan timeout)
at System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan timeout)
at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at System.ServiceModel.ICommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.ClientBase`1.System.ServiceModel.ICommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.ClientBase`1.Open()
at Ftrank.Service.Util.ServiceManagerImpl.CreateBussinessClient()
at Ftrank.Service.Util.ServiceManagerImpl.GetBussinessService()
at Ftrank.Presentation.OrderClient.POrderClient.ClientModel.ClientServiceAdapter.SaveFoodOrder()
--- End of inner exception stack trace ---
at Ftrank.Presentation.OrderClient.POrderClient.ClientModel.ClientServiceAdapter.SaveFoodOrder()
at Ftrank.Presentation.OrderClient.POrderClient.ClientViewModel.OCLowerRightViewModel.<get_ConfirmServingCommand>b__a()
------------------------------ end --------------------------------
宿主是Service Applicantion 客户端在20台上下
宿主是服务应用程序,不是IIs
操作系统是win2003
看看你的IIS上应用程序池是不是正确
宿主是服务程序,不是iis
你看下是不是有什么地方限制了TCP连接数。你的是什么系统,应该有默认连接数设定的。
操作系统是Win2003
@Franky Lee: 默认并发连接数好像是10个。