Forum posts for servic~1.exe

Is there a way to handle WCF server faults in one spot on the client?

Right now I am wrapping all my WCF service calls in the following try/catch block and I am wondering if there is a way to set this in one place and have it apply to all service calls.

try
{
Product test = client.GetProductById(1);
}
catch (TimeoutException ex)
{
WPFMessageBox.Show('The service operation timed out.' + ex.Message);
}
catch (FaultException<CustomFault> ex)
{
WPFMessageBox.Show('CustomFault:' + ex.ToString());
}
catch (FaultException ex)
{
WPFMessageBox.Show('Unknown Fault:' + ex.ToString());
}
catch (CommunicationException ex)
{
WPFMessageBox.Show('There was a communication problem' + ex.Message +
ex.StackTrace);
}

View complete forum thread with replies

Other posts related to servic~1.exe

See Related Forum Messages: Follow the Links Below to View Complete Thread

Windows 7 Service Pack 1 .exe from existing install?
Writing an executable file with another
Need a (script)procedur to install an application as windows service using NSIS script
Is there a way to handle WCF server faults in one spot on the client?
use space for thousands separator reporting services
Multiple NT service owned by the same program in Delphi
DLL shared memory problems with different session, service and user session
How to hook windows service
Run methods as service c#?
Deployment/Management of Web Sites for Multiple Clients
32-bit windows service do not start on 64-bit windows 7
CruiseControl.NET stalls with Psexec
generate server-side google charts as images
Pros and Cons of using MongoDB instead of MS SQL Server

What is the carbon footprint of your coffee?

Is it low? Is it high? Can this things really kill the planet Earth? Maybe the answer will surprise you. Maybe not.