Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Events with IIS hosted remoting 1

Status
Not open for further replies.

koraykazgan

Programmer
Jan 11, 2005
17
DE
Hi there,

I want to program a remoting application, where the remotable object will be hosted in IIS. This should be a singleton object, because I need to exchange information between users.

Besides I will have a winForms application, which will activate that object and use it, as it were local. I have programmed such an application, but when I want to raise events, I am recieving deserialization errors.

I have analyzed many samples and articles about that problem, but I couldn't find a solution, where the remote object is hosted in IIS and events are used.

Can you help me with my problem? A sample program, which is working in this scenario would be best.

Thanks for help,
bye.
 
Are you simply raising events or implementing delegates? Where are you raising the events/delegates?

One option is to create a separate class for event handling and give the component host and client a reference to it.

I haven't done this with IIS though, just standard remoting.
 
Hi again,

I have a class which is inherited from MarshalByRefObject. I have defined a delegate outside the class. Besides I have written a class which is deriving from eventargs.

So I have defined an event in the remotable class.

You have told, that you have not used remoting in IIS. It would be nice, if you can send me an example anyway.

Thanks again,
Bye.
 
This is not an elegant example but one I came up with. It comprises an EventListener (dll), RemotableObject (dll), ComponentHost (Windows app) and Client App (Windows app).

Most of the event handling code exists in the RemotableObject

This example is too long to list here so please email me at imterpsfan2@yahoo.com.


 
and bring on the spam....

just for future reference, you're better off typing you(at)yourisp(dot)com
 
Thanks, I goofed on that one. Hopefully the repercussions won't be too severe.
 
don't worry - I only signed you up for about 60 adult sites so far...

how do you feel about the martha stewart site? i heard she has a VIP option via email :)


j/k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top