[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.remoting

CallContext lost when reaching Custom server sink?

Niels Flensted-Jensen

11/4/2004 3:04:00 PM

In a simple remoting support library I create a custom IClientChannelSink and
in the ProcessMessage I stick a principal in the CallContext.
The Principal is wrapped in an ILogicalThreadAffinative marked object to
make it cross AppDomain boundries.

When the call reaches the equivalent IServerChannelSink.ProcessMessage the
CallContext.GetData() gets me nothing.

Has the CallContext not been prepared when going through the Channel? Or is
there a simple way to make this work?

Thanks,

Niels
1 Answer

Ken Kolda

11/4/2004 4:58:00 PM

0

When inside a server channel sink I believe you have to get the call context
from the IMessage object -- it hasn't been merged into the current thread's
CallContext object yet. See:

http://msdn.microsoft.com/library/en-us/cpguide/html/cpconusingcallc...

Ken


"Niels Flensted-Jensen" <NielsFlenstedJensen@discussions.microsoft.com>
wrote in message news:6C1F9D59-3E6D-4D71-AC06-18F21B3EC387@microsoft.com...
> In a simple remoting support library I create a custom IClientChannelSink
and
> in the ProcessMessage I stick a principal in the CallContext.
> The Principal is wrapped in an ILogicalThreadAffinative marked object to
> make it cross AppDomain boundries.
>
> When the call reaches the equivalent IServerChannelSink.ProcessMessage the
> CallContext.GetData() gets me nothing.
>
> Has the CallContext not been prepared when going through the Channel? Or
is
> there a simple way to make this work?
>
> Thanks,
>
> Niels