Hi

I have implemented a server-side sink for checking various things on
incoming calls on the server. At the same time I am using the CallContext
class to pass information from the client to the server.

This works fine.

However if I in the server-side sink throw an exception, the call context
on the client is destroyed, which is quite annoying.

I have a guess on why this behaviour is occuring:

In a ProcessMessage method in a sink:

public System.Runtime.Remoting.Channels.ServerProcessing ProcessMessage
(IServerChannelSinkStack sinkStack,
System.Runtime.Remoting.Messaging.IMessage requestMsg, ITransportHeaders
requestHeaders, System.IO.Stream requestStream, out
System.Runtime.Remoting.Messaging.IMessage responseMsg, out
ITransportHeaders responseHeaders, out System.IO.Stream responseStream)

the call context is located in the Properties of the requestMsg, and I
would guess that the same is true for the response. This probably means
that throwing the exception in the ProcessMessage method returns a null
for the responseMsg, causing the destruction of the CallContext on the
client.

So my questions are:

1) Does anybody know whether my assumption is correct?

2) Can anyone provide pointers on implementing such a custom response,
from inside a sink?

I can of course provide further information if needed.

Thanks in advance

- Klaus Lindemann

===================================
This list is hosted by DevelopMentor�  http://www.develop.com
Some .NET courses you may be interested in:

Guerrilla ASP.NET, 26 Jan 2004, in Los Angeles
http://www.develop.com/courses/gaspdotnetls

Guerrilla .NET, 8 Dec 2003, in Los Angeles
http://www.develop.com/courses/gdotnet

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to