I'm having some difficulty trapping an exception during my testing. I actually disconnect the service so that the endpoint is not available, and I am attempting to modify my application to handle that possibility.
The problem is that no matter where I put try/catch blocks, I can't seem to catch this thing before it gets to unhandled.
I have tried wrapping both my creation code in try/catch,
this.TopicServiceClient = new KeepTalkingServiceReference.TopicServiceClient();
this.TopicServiceClient.GetAllTopicsCompleted += new EventHandler<KeepTalkingServiceReference.GetAllTopicsCompletedEventArgs>(TopicServiceClient_GetAllTopicsCompleted);
this.TopicServiceClient.GetAllTopicsAsync();
as well as the delegate that gets called when the service call is complete.
public void TopicServiceClient_GetAllTopicsCompleted(object sender, KeepTalkingServiceReference.GetAllTopicsCompletedEventArgs e)
{
try
{
...
No dice. Any thoughts?