.Net Remoting Issue
-
I got everything working fine in my .net remoting proggy. My question is, i want to make a single instance of my obj that my server can put data in and then hand it out to the clients. I dont know how to create a instance of the object from within my server, after it is already registered as a wellknowntype. i tryed using the code from my client to init a instance of the object but it just tells me that "the http something is already in use" i.e this code wont work on the server who registered the object.
ChannelServices.RegisterChannel( new HttpChannel() ); IRemoteObj obj = (IRemoteObj) Activator.GetObject( typeof(IRemoteObj), "http://localhost:8085/ObjURI" );
Thanks for your time. Jesse The Code Project Is Your Friend... -
I got everything working fine in my .net remoting proggy. My question is, i want to make a single instance of my obj that my server can put data in and then hand it out to the clients. I dont know how to create a instance of the object from within my server, after it is already registered as a wellknowntype. i tryed using the code from my client to init a instance of the object but it just tells me that "the http something is already in use" i.e this code wont work on the server who registered the object.
ChannelServices.RegisterChannel( new HttpChannel() ); IRemoteObj obj = (IRemoteObj) Activator.GetObject( typeof(IRemoteObj), "http://localhost:8085/ObjURI" );
Thanks for your time. Jesse The Code Project Is Your Friend...If you want to publish a specific instance of an object you should use RemotingServices.Marshal() instead of RegisterWellKnownServiceType().
-
If you want to publish a specific instance of an object you should use RemotingServices.Marshal() instead of RegisterWellKnownServiceType().