Henke
8/31/2004 7:37:00 AM
Hi!
Here's some code...
My Global.asax:
protected void Application_Start(Object sender, EventArgs e)
{
// Configure remoting
BinaryClientFormatterSinkProvider clientProvider = new
BinaryClientFormatterSinkProvider();
BinaryServerFormatterSinkProvider serverProvider = new
BinaryServerFormatterSinkProvider();
serverProvider.TypeFilterLevel = TypeFilterLevel.Full;
System.Collections.IDictionary props = new System.Collections.Hashtable();
props["port"] = 2100;
string channelName = System.Guid.NewGuid().ToString();
props["name"] = channelName;
props["typeFilterLevel"] = TypeFilterLevel.Full;
bllChannel = new TcpChannel(props, clientProvider, serverProvider);
ChannelServices.RegisterChannel(bllChannel);
}
Where I use it:
BaseObject retObject = Activator.GetObject(typeof(CustomerManager),
"tcp://comp00569:2099/CustomerManager");
CustomerList customers = retObject.GetCustomers();
/Henke
"Raghavendra T V" wrote:
> Hi Henke,
>
> From the error you posted its quite difficult to figure out the exact error.
> may be you can post the piece of code that is crashing the application.
>
> Anyways here are the list of common remoting errors.
>
> Common Remoting Errors.
> 1.You Register the channel with a specific port and forget to unregister it
> once the use of it is over.
> 2.Trying to connect to wrong port.
> 3.By default Remoting Takes the remoting channel name as TCP (if you use TCP
> Channel) and you are trying to use the same name for channel again. in your
> code.
>
> Hope this helps you.
>
> Thanks
> Raghavendra
>
>
> "Henke" <henke_nord@hotmail.com> wrote in message
> news:uEGYpq$iEHA.396@TK2MSFTNGP12.phx.gbl...
> > Hi!
> > I read in MSDN that an object could be marshaled by value just be mark it
> > [Serializable]. When I do this and tries to invoke a method on the object
> I
> > get this exception:
> >
> > An unhandled exception of type 'System.Runtime.Remoting.RemotingException'
> > occurred in mscorlib.dll
> > Additional information: Trying to create a proxy to an unbound type.
> >
> > If I derive the class from MarshalByRefObject everything works fine. I
> don't
> > do any changes in my configuration files.
> >
> > Can some one please tell what's wrong here?
> > /Henke
> >
> >
>
>
>