[英]How to catch exact exception in wcf service
我想捕獲WCF服務中的所有故障,並找到解決方法
OperationContext.Current.Channel.Faulted += delegate(object sender, EventArgs args)
{
//exception is thrwon in wcf service
}
問題是如何知道故障事件中的確切異常?
更好的方法是通過實現IErrorHandler接口來使用錯誤處理程序 。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.