WCF故障异常 [英] WCF Fault Exceptions

查看:84
本文介绍了WCF故障异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello开发者社区。



我需要有人帮助从我的服务器回来的WCF服务异常。



消息..因为处于故障状态而无法用于通信。



这是因为我在所有捕获中都抛出了一个新的FaultException()吗?



有没有更好的方法从WCF服务中获得简单,干净的expcetion。



FYI - 在WCF服务中,我正在将堆栈跟踪和更多详细信息写入运行服务的服务器上的事件查看器...所以我只需要从WCF返回的简单消息。



任何帮助都会得到赞赏!谢谢大家!

Hello developer community.

I need someones assistance on a WCF service exception coming back from my server.

The message "..cannot be used for communication because it is in the Faulted state".

Is this be because I am throwing back a new FaultException() in all of my catches?

Is there a better way to get a simple, clean expcetion back from a WCF service.

FYI - In the WCF service I am writting the stack track and more details to the Event Viewer on the server where the service is running...so I only need a simple message back from WCF.

Any help would be appreciaated! Thanks all!

推荐答案

FIX:此通信对象System.ServiceModel.Channels.ServiceChannel不能用于通信,因为它处于Faulted状态 [ ^ ]

FYI

WCF错误处理和一些最佳实践 [ ^ ]


这篇关于WCF故障异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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