开发者

Access external data from Silverlight application running in a webpart in Sharepoint 2010

I can read the SP lists fine and pull data out of the SP context, but I am trying to get data from an external database as well and I don't know exactly how to do that. Is is possible to add WCF communication开发者_开发技巧 to the webpart that will allow the Silverlight app to communicate to a WCF service? If so, any examples on how to do this?

Or is there a better way to store/retrieve custom data that I don't want to be accessable through custom sp lists?


You could use a combination of BCS/External Content Types to surface the data in SharePoint, then the SharePoint client object model to access this.


Eric,

I am not sure if i have understood your question correctly. If you have a custom webpart that loads some silverlight content and silverlight needs to access external data using wcf, then you can do the following:

  1. If you need to deploy your wcf service in sharepoint site, then follow this article from Sahil Malik: http://blah.winsmarts.com/2008-5-SharePoint_as_a_WCF_Host.aspx

  2. Once the service is deployed and your able to access it from ie, Add service reference in your silverlight project.

  3. Load the silverlight application in your webpart

This link might also help:

http://blah.winsmarts.com/2008-7-SilverLight_WCF_References_in_SharePoint_-_The_right_way.aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜