Exception Handling for IIS hosted WCF services?

Aug 27, 2009 at 7:26 PM

Hi Michele.  Thank you so much for the code work.  Being a experienced developer but new to WCF services these type projects really get thing moving quickly.  But before I spend too much time understanding the big picture of code... is this process of Exception Handling recommended for wcf services that are hosted via IIS utilizing the http bindings?  Or would this better server as in the samples where the service host is running within the current network through localized bindings?

Thanks, geo.


Aug 28, 2009 at 1:29 PM

After a night of thought and plunder... I think I've anwsered my question.  We are not utilizing the WCF services as a full time resouce but more of a feature event.  We are creating the instance of the proxy when the feature is accessed, then it's task are processed then the proxy is released.  Would it be fair to say this Exception Handling process is best suited for an application that ( as shown in the ToDoList test application ) is a full time proxy user?


Aug 29, 2009 at 9:03 PM

Hi geo,

This proxy wrapper is best for WIndows clients that hang on to the proxy for its lifetime, use a binding with session, and want to automatically recover from problems introduced by session timeouts and uncaught exceptions.

I would not recommend caching channels at the server (from ASP.NET to service or WCF service to service) therefore this wrapper was not tested in that environment.

Also, the value of the wrapper is lost if you don't use session so WebHttpBinding, BasicHttpBinding or WSHttp without secure or reliable sessions doesn't gain value.