0
我有wcf服務,並將其用於ASP.net MVC和WCF RIA服務。我能夠將錯誤異常捕獲到ASP.net MVC中,但無法捕獲到WCF RIA服務。將外部服務故障異常捕獲到wcf riaservice
下面的代碼是WCF RIA服務,我使用WCF服務
public class MyService : LinqToEntitiesDomainService<MyEntities>
{
try
{
ExternalServiceProxy.SaveData();
}
catch(FaultException<ExceptionInfo> ex)
{
//Not able to catch faultexception
}
catch(Exception ex)
{
//Every time catch exception and faultexception information lost
}
}