Remoting problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • FOCB

    #1

    Remoting problem

    Hello,
    Please can you have a look at the cod below. Basically I have got a remote
    object and would like the client to subscribe to an event of the remote
    object.
    But I am getting the following exception: Type
    System.Delegate SerializationHo lder and types derived from it (such as
    System.Delegate SerialiwationHo lder) are not permitted to be deserialized at
    this security level.
    Getting this even when CAS is switched off.
    Any idea ?
    .....
    myChannel = new TcpChannel();

    ChannelServices .RegisterChanne l(myChannel);

    this.m_remoteOb ject =
    (RemoteObject)A ctivator.GetObj ect(typeof(Remo teObject),"tcp://localhost:8099
    /MyRemoteObject" );


    if (m_remoteObject != null)

    {

    m_remoteObject. MyEvent += new MyEventRaisedEv entHandler(
    OnMyEventRaised ) ;

    MessageBox.Show ("Client subscribed to the event");

    }


Working...