拔下网络电缆后,无法访问WCF服务 [英] WCF Service is not accessible after removing Network Cable

查看:96
本文介绍了拔下网络电缆后,无法访问WCF服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的机器上,拔下网络电缆后,我无法致电WCF服务.找不到任何应用程序异常.但是下面是我从事件查看器-系统中获得的例外.

On my machine after removing network cable i am not able to call WCF Services. Not able to find any application exception. But below are the exceptions which i got from Event viewer - System.

错误1

由于缺少与域控制器的网络连接,组策略的处理失败.这可能是暂时的情况.计算机连接到域控制器并且组策略成功后,将生成一条成功消息. 处理.如果几个小时都没有看到成功消息,请与管理员联系.

The processing of Group Policy failed because of lack of network connectivity to a domain controller. This may be a transient condition. A success message would be generated once the machine gets connected to the domain controller and Group Policy has succesfully processed. If you do not see a success message for several hours, then contact your administrator.

错误2

解析站点'1'的net.pipe绑定'*'时发生错误,因此该站点的协议暂时被禁用.有关更多详细信息,请参见异常消息.
 绑定:net.pipe:*
 来源:System.ServiceModel.Activation.ListenerAdapter/4032828
异常:System.UriFormatException:协议绑定"*"对"net.pipe"无效.  这可能是因为端口号超出范围.
    at System.ServiceModel.Channels.BaseUriWithWildcard..ctor(字符串协议,Int32 defaultPort,字符串绑定,Int32 segmentCount,字符串路径)
    at System.ServiceModel.Channels.BaseUriWithWildcard.CreateUri(字符串协议,字符串绑定,字符串路径)
 在System.ServiceModel.Activation.ListenerAdapter.RegisterBindings(IActivatedMessageQueue队列,Int32 siteId,String []绑定,字符串路径)中
进程名称:SMSvcHost
进程ID:5276

An error occurred while parsing the net.pipe binding '*' of the site '1', thus the protocol is disabled for the site temporarily. See the exception message for more details.
 Binding: net.pipe:*
 Source: System.ServiceModel.Activation.ListenerAdapter/4032828
 Exception: System.UriFormatException: The protocol binding '*' is not valid for 'net.pipe'.  This might be because the port number is out of range.
   at System.ServiceModel.Channels.BaseUriWithWildcard..ctor(String protocol, Int32 defaultPort, String binding, Int32 segmentCount, String path)
   at System.ServiceModel.Channels.BaseUriWithWildcard.CreateUri(String protocol, String binding, String path)
   at System.ServiceModel.Activation.ListenerAdapter.RegisterBindings(IActivatedMessageQueue queue, Int32 siteId, String[] bindings, String path)
 Process Name: SMSvcHost
 Process ID: 5276

错误3

分派重复的套接字时发生错误:此句柄现在在进程中泄漏.
  ID:5552
 来源:System.ServiceModel.Activation.TcpWorkerProcess/2061578
异常:System.ServiceModel.FaultException:客户端由于内部错误而无法处理回调请求.  有关该错误的更多信息,请打开IncludeExceptionDetailInFaults(来自CallbackBehaviorAttribute 或通过< clientDebug>配置行为),以便将异常信息发送回服务器,或者按照Microsoft .NET Framework SDK文档打开跟踪并检查客户端跟踪日志.

服务器堆栈跟踪:
 在System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(消息回复,MessageFault错误,字符串操作,MessageVersion版本,FaultConverter faultConverter)
    at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime操作,ProxyRpc& rpc)
    at System.ServiceModel.Channels.ServiceChannel.EndCall(字符串操作,Object []输出,IAsyncResult结果)
    at System.ServiceModel.Channels.ServiceChannelProxy.InvokeEndService(IMethodCallMessage methodCall,ProxyOperationRuntime操作)
    at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage消息)

异常在[0]处重新抛出:
    at System.Runtime.AsyncResult.End [TAsyncResult](IAsyncResult结果)
    at System.ServiceModel.Activation.WorkerProcess.EndDispatchSession(IAsyncResult result)
 进程名称:SMSvcHost
进程ID:2600

An error occurred while dispatching a duplicated socket: this handle is now leaked in the process.
 ID: 5552
 Source: System.ServiceModel.Activation.TcpWorkerProcess/2061578
 Exception: System.ServiceModel.FaultException: The client was unable to process the callback request due to an internal error.  For more information about the error, either turn on IncludeExceptionDetailInFaults (either from CallbackBehaviorAttribute or from the <clientDebug> configuration behavior) on the client in order to send the exception information back to the server, or turn on tracing as per the Microsoft .NET Framework SDK documentation and inspect the client trace logs.

Server stack trace: 
   at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)
   at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
   at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)
   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeEndService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]: 
   at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
   at System.ServiceModel.Activation.WorkerProcess.EndDispatchSession(IAsyncResult result)
  Process Name: SMSvcHost
 Process ID: 2600

您能帮助我们找到原因吗??

Can you help us to find the reason.?

推荐答案

WCF服务与WCF客户端发生的情况无关,而客户端可以这样做. t连接到WCF服务.

The WCF service has nothing to do with what is happening on the WCF client side when the client can't connect to the WCF service.

该链接讨论了当客户端代码调用WCF服务时应实施的try/catch.您应该忽略有关使用using语句消除问题"主题的谈话,但是, 当类型化的客户端调用WCF服务时,您尝试实现try/catch模式和异常处理.

The link talks about the try/catch that should be implemented when the client side code makes the call to a WCF service. You should ignore about the talk on the subject about, "Advoiding Problems with the Using statement", but rather,  you try to implement the try/catch pattern and exception handling when a typed client makes the call to the WCF service.   

https://msdn.microsoft.com/zh-cn/library/aa355056%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396

https://msdn.microsoft.com/en-us/library/aa355056%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396


这篇关于拔下网络电缆后,无法访问WCF服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆