Chester West
7/19/2004 10:23:00 PM
Sunny -
It still doesn't work....
Do I need to create a port/channel by doing the following
int port=System.Convert.ToInt32(this.txtPort.Text.Trim());
this.serverchannel=new TcpServerChannel ( port ) ;
ChannelServices.RegisterChannel ( this.serverchannel ) ;
this.MyUserObj=new User();
System.Runtime.Remoting.RemotingServices.Marshal(this.MyUserObj,"User",typeo
f(User));
this.MyUserObj.SetMessage(this.MsgToSet.Text.Trim());
Thanks
"Sunny" <sunny@newsgroups.nospam> wrote in message
news:%23mBo9zdbEHA.4092@TK2MSFTNGP11.phx.gbl...
> Hi,
>
> at the server, the url should be only "User", nit the full server path.
> Just like what you put in RegisterWellKnown...
> Also, it is better to use the overloaded Marshal method, which also
> defines the type.
>
> Change your server code to:
>
> In article <umLkWtdbEHA.3728@TK2MSFTNGP10.phx.gbl>, CWEST@Video-
> mation.com says...
> >
> > if (this.objSingleton==null)
> >
> > {
> >
> > this.objSingleton=new User();
> >
> > System.Runtime.Remoting.RemotingServices.Marshal(this.objSingleton,url);
>
> System.Runtime.Remoting.RemotingServices.Marshal(this.objSingleton,
> "User", typeof(User));
>
> Cheers
> Sunny