I have developers who are using my BusinessLibrary on the client side. They work with several servers. Switch to one server and Create/Load/Delete and Save BusinessObjects to it. Now, I am searching for a way to throw a ServerNotAvailable Exception when the WCF-Connection has aborted (for example when the server was shutted down or the network has broken). Now, the developers has to handle System.ServiceModel.CommunicationException. I am searching for a central place where I can replace this CommunicationException with a own ServerNotAvailableException.
Can someone help me, how I can do this?
Best Regards, Thomas
Hook into the static event DataPortalInvokeComplete on the Csla.DataPortal.
This is called immediately after the DataPortal call is completed (whether it failed or not) and you can rethrow your own exception.
Copyright (c) Marimer LLC