Silverlight的WCF服务 [英] WCF services for Silverlight

查看:72
本文介绍了Silverlight的WCF服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

专家,

Hi Experts,

我已经在WPF中实现了一个方案,并且我正在Silverlight中寻找相同的方案.

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

我的场景是我有两个项目,分别是A和B.在A项目中,我正在注册一个带有班级的频道

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.

像上面一样,如何使用WCF服务在Silverlight中实现.在这里,我需要一个活动对象,并且需要使用该对象来访问许多方法.

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

我没有太多了解SL的Web服务,这些建议对我很有帮助...

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

sankar

推荐答案

您的交流方案是什么?以下文章对于将.Net Remoting迁移到WCF应该会有所帮助:

What is your communication scenario? The following article should be helpful for migrating .Net Remoting to WCF:

第3步-使用会话而不是客户端激活的对象

Step 3 - Use Sessions instead of Client-Activated Objects

http://msdn.microsoft.com/zh- us/library/aa730857(v = VS.80).aspx#netremotewcf_topic6


这篇关于Silverlight的WCF服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆