Remoting and HttpModule

G

Guest

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

RemotingConfiguration.RegisterWellKnownClientType(typeof(RemotingObject),
"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
 
J

John Saunders

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

RemotingConfiguration.RegisterWellKnownClientType(typeof(RemotingObject),
"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
 

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

Similar Threads

httpmodule redirection 1
Remoting 1
SessionState & Remoting 1
httpModule... 1
HttpModule and unloading 0
Remoting or Web Service? 2
HttpModule and User Controls 4
Remoting crashes IIS 0

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,072
Latest member
trafficcone

Latest Threads

Top