For Programmers: Free Programming Magazines  


Home > Archive > ASP .NET > December 2004 > Remoting and HttpModule









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Remoting and HttpModule
Kevin Burton

2004-12-30, 8:57 pm

I have an HttpModule that I want to communicate to a .NET remoting server.
Normally I do something like:

RemotingConfiguration. RegisterWellKnownClientType(typeof(Remot
ingObject),
"tcp://localhost:9400/RemotingServer/visa.dps.ppc.RemotingObject.rem");

This does some "magic" so whenever I instantiate the RemotingObject it is
connected to the server. This works fine for clients that I have relative
control over but with an HttpModule I am not sure how to proceed. If I need
to use the remoting service in each of the events that I have register of on
init, do I need to run the above registration in every event handler that the
HttpModule is listening for? Can I do it once in the application? How do I
tell that the application is not "registered"? Is there alot of overhead for
the registration? I guess I have the same questions for instantiating the
remoting object.

Thank you for your help.

Kevin

John Saunders

2004-12-30, 8:57 pm

"Kevin Burton" <KevinBurton@discussions.microsoft.com> wrote in message
news:7D8E3BBB-8A2A-46D8-98AF-1284D9E33B7B@microsoft.com...
>I have an HttpModule that I want to communicate to a .NET remoting server.
> Normally I do something like:
>
> RemotingConfiguration. RegisterWellKnownClientType(typeof(Remot
ingObject),
> "tcp://localhost:9400/RemotingServer/visa.dps.ppc.RemotingObject.rem");
>
> This does some "magic" so whenever I instantiate the RemotingObject it is
> connected to the server. This works fine for clients that I have relative
> control over but with an HttpModule I am not sure how to proceed. If I
> need
> to use the remoting service in each of the events that I have register of
> on
> init, do I need to run the above registration in every event handler that
> the
> HttpModule is listening for? Can I do it once in the application? How do I
> tell that the application is not "registered"? Is there alot of overhead
> for
> the registration? I guess I have the same questions for instantiating the
> remoting object.


You can do the registration in the Application_Start event in Global.asax.
This only happens once per application start, so it's ok to do one-time
initialization here.

John Saunders


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com