WCF Server side handled Exceptions causes CommunicationException in proxy object. [solved]
-
I have a WinForm application (client) communicating with a WCF service via NamedPipe binding, hosted by an NT Service. On the server side a
FileNotFoundException
can occur at one point, but when I catch thisFileNotFoundException
, perform needed tasks and then return to the client I always get aCommunicationException
with an InnerException saying:There was an error reading from the pipe: Unrecognized error 109 (0x6d).
The proxy code itself is pretty simple.public partial class ConfigurationServiceProxy : ClientBase<IConfigurationService>, IConfigurationService
{
...
...
public ChangeResult Update()
{
return Channel.Update(); //this fails when a handled exception occurs on server side.
}
...
...
}Does anyone know what may cause this behaviour? No matter how the
Update
operation turns out I return my custom classChangeResult
and when noExceptions
occur on server side it works fine. So what am I missing here? [EDIT] What I was missing was the fact that I returned anApplicationException
in myChangeResult
when I had declared a member of the classException
. Sloppy indeed.. Now I will create my own Exception class instead..modified on Thursday, July 8, 2010 4:00 AM