locked
Remoting scenario in Silverlight. RRS feed

  • Question

  • Hi Experts,

    I have achieved a scenario in WPF and i was looking for the same in Silverlight.

    My Scenario is i have 2 projects say A and B. In the A project, I am registering a Channel with a class

    private IChannel channel;
    this.channel = new IpcChannel("Control");
    ChannelServices.RegisterChannel(this.channel, false);
    RemotingConfiguration.RegisterWellKnownServiceType(typeof(MyInteropService), "MyTestService", WellKnownObjectMode.Singleton);

    and from the project B, am getting this MyIntropService class by the below code.

    private static IMyInteropService thisInstance;
    thisInstance = (IMyInteropService)Activator.GetObject(typeof(IMyInteropService), "ipc://Control/MyTestService");

    This returns the object of MyIntropService Class.

    Like the above, how can i achieve in Silverlight. Here i need a live object and with that object i need to access a so many methods.

    I don't have much knowledge SL's remoting and the suggestions are much helpful to me... 

    Friday, July 6, 2012 1:11 PM

Answers

  • Silverlight does not provide all the same classes as in the Full.NET framework.

    It looks like you are trying to communicate between 2 Silverlight instances.

    if so, you can go though the HTML DOM (a Javascript object) or use the LocalMessageSender/Reciever classes.

    Wednesday, July 11, 2012 7:38 PM
  • Depending on your particular scenario you might solve your with a wcf service.

    You can create duplex service which silverlight (and wpf/other full .net programs ) clients communicate via.
    Or if one end should be "full" .net program  then that program can self host a wcf service.

    You might also be able to use tcp sockets, but that is not trivial.

    Monday, July 16, 2012 3:14 PM

All replies

  • Silverlight does not provide all the same classes as in the Full.NET framework.

    It looks like you are trying to communicate between 2 Silverlight instances.

    if so, you can go though the HTML DOM (a Javascript object) or use the LocalMessageSender/Reciever classes.

    Wednesday, July 11, 2012 7:38 PM
  • Depending on your particular scenario you might solve your with a wcf service.

    You can create duplex service which silverlight (and wpf/other full .net programs ) clients communicate via.
    Or if one end should be "full" .net program  then that program can self host a wcf service.

    You might also be able to use tcp sockets, but that is not trivial.

    Monday, July 16, 2012 3:14 PM