Mon. Sep. 20, 2004 11:10 AM PT
I suppose your described scenario is exactly the same as I have in my
application. The reason is, that you are not able to get the CallContext in
the MBRO's ctor, because, this CallContext is available, only after the MBRO
is completely constructed, in other words, when its ctor execute comletely
only then in MBRO's method it is available.
You can see the behavior of SingleCall, ctor is not very important, as the
object is state-less, as soon it finishes its call it dispose it off. Hence,
I think CallContext is only available in MBRO's method call. It is not
clearly mentioned anywhere in MSDN, but if you read again the description
about the CallContext, and its examples, you will notice this fact.
Good Luck !!!
"José Joye" <jo*******@KILLTHESPAMSbluewin.ch> wrote in message
news:uC**************@TK2MSFTNGP11.phx.gbl...
I'm playing around with the "CallContext" class to pass around extra
information between my client and Server applications (implemented with
Remoting).
My Server is a SAO-singlecall.
If I try to use the CallContext.GetData() method to retrieved information
from within a method in the Server part, all if fine.
If I try to do it from within the Constructor (which is called each time
prior a method is executed on the Server [singlecall]), the information is
not available ?????
I tried to look at the MSDN documentation about when such a information is
made available. However, I did not find anything...
Can anyone tell me the reason why the "CallContext" information is not
available when the Server Object Constructor is called?
Thanks a lot,
José