簡體   English   中英

如何在WCF服務中捕獲確切的異常

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM