Capture Remoting Event?

L

lucius

I have a Remoting server (via Http channel) with many objects that are
CAO.

I would like to hook some kind of overall "Remoting primary" event so
I can log every time anything is done with the server. I do not want
to change the implementation of the objects, I just want something
that acts a little bit like a web server HTTP log.

Thanks.
 
W

Walter Wang [MSFT]

Hi lucius,

I think you can use ITrackingHandler to do this. Here's an example on this:

#15 Seconds : Tracking Services in .NET Remoting and Implementing Your Own
Tracking Handlers
http://www.15seconds.com/issue/030225.htm

Please reply here to let me know if this helps or not.


Regards,
Walter Wang ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 
L

lucius

According to that link, ITrackingHandler is only supported in CAOs. I
have server-side Single Call Objects. Maybe I need to use a
server-side channel sink? If so, please show a sample.

Thanks.
 
W

Walter Wang [MSFT]

Hi lucius,

This is a quick note to let you know that I am performing research on this
issue and will get back to you as soon as possible. I appreciate your
patience.


Regards,
Walter Wang ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 
S

Steven Cheng[MSFT]

Hi lucius,

I think your idea about using a custom channel sink is reasonable. In .NET
remoting, if you want to add a common injection point which can hook the
client-server message communications and do some customization or
monitoring task(logging), custom channel sink is the expected approach.
Just like the SoapExtension in ASP.NET webservice, you can inject and chain
multiple custom sinks into the client or server's channel sink chain.

#Sinks and Sink Chains
http://msdn2.microsoft.com/en-us/library/tdzwhfy3.aspx

Here are some examples which have used custom sinks for customization
purpose:

#.NET Remoting Customization Made Easy: Custom Sinks
http://www.codeproject.com/csharp/customsinks.asp

#Secure Your .NET Remoting Traffic by Writing an Asymmetric Encryption
Channel Sink
http://msdn.microsoft.com/msdnmag/issues/03/06/NETRemoting/

Hope this helps also.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top