.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
MarieAdela
Imran Ghani
Post New Web Links

Silverlight Application using Sharepoint as a datasource using the Client Object Model

Posted By:      Posted Date: October 14, 2010    Points: 0   Category :SharePoint
 

Hi,

In my scenario i have a Silverlight application hosted in ASP.NET. I want to push/pull data from a sharepoint site using the Client Object Model. Is this possible?

Notice that i don't want my Silverlight app as a web part...it is hosted in asp.net and just uses Sharepoint 2010 as a data source. Will the Client Object Model work here or are sharepoint web services the only way out??. I can host both the SL app and the sharepoint site in the same domain if required...

Please advice

Cennest

www.cennest.wordpress.com

 

 




View Complete Post


More Related Resource Links

Video: SharePoint 2010: Silverlight Client Object Model

  
In this video you will learn how to use the SharePoint client object model to program a Silverlight application against SharePoint data. (Length: 9:03)

Video: Developing Silverlight Applications by Using the SharePoint 2010 Client Object Model

  
This demonstration shows how to use the client object model from a Silverlight application. (Length: 11:15)

SharePoint 2010 site using FQDN and Silverlight Client object model issues

  

I am working a FQDN installation of SP2010 site and I am having touble connecting to it from Silverlight, when my Silverlight app is running outside that SP2010.
Just to include the note, that if I use the CLR client object model, from a Console Application, I am able to connect to the FQDN SP 2010 site, and get all data I need. Using the CLR and monitoring with fiddler there are two consequent requests made: first GET to http://my_sp2010_site_fqdn/_vti_bin/sites.asmx, then POST to http://my_sp2010_site_fqdn/_vti_bin/client.svc/ProcessQuery and Everything works fine.
However when it comes to the Silverlight Client I have troubles.
If I put my silverlight application in a web part inside my site, it works. If I put it on a regular site, outside SP - it does not work and following behavior is observed:

There is initial request sent to
http://my_sp2010_site_fqdn/_vti_bin/sites.asmx
but there is no consequent request to http://my_sp2010_site_fqdn/_vti_bin/client.svc
That second request does not even show up in fiddler.

private ListItemCollection _projects;
...

ClientC

Using Silverlight Client Object Model outside Sharepoint ?

  

Is there any way to make the Silverlight Client Object work with SharePoint 2010, if the Silverlight Application is not hosted inside the SharePoint itself? So far I was able to make it work only if I host my Silverlight inside SharePoint, and I can't make it work in a stand-alone Silverlight Application. I have clieantaccesspolicy file within the sharepoint site I want to connect to, but the client itself does not work. There is initial request sent to
http://my_sp2010_site_fqdn/_vti_bin/sites.asmx
but there is no consequent request to http://my_sp2010_site_fqdn/_vti_bin/client.svc and my RequestFailed handler is hit with following exception:

e.Exception is SecurityException:
   at System.Net.Browser.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object state)
   at System.Net.Browser.BrowserHttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   at Microsoft.SharePoint.Client.ClientRequest.ExecuteQueryGetResponseAsyncCallback(IAsyncResult asyncResult)
  
Inner Exception is:
System.Security.SecurityException  
   at System.Net.Browser.BrowserHttpWebReque

Accessing SharePoint 2010 Data with the Silverlight Client Object Model (Visual How To)

  
Learn how to use the SharePoint 2010 managed client object model to read and write data in SharePoint sites from Silverlight applications.

Video: Accessing SharePoint 2010 Data with the Silverlight Client Object Model

  
Watch a short video that shows how to use the SharePoint 2010 managed client object model to read and write data in SharePoint sites from Silverlight applications.

Sample: Accessing SharePoint 2010 Data with the Silverlight Client Object Model (Visual How To)

  
Explore code that shows how to use the SharePoint 2010 managed client object model to read and write data in SharePoint sites from Silverlight applications.

Client Object Model Resource Center | SharePoint 2010

  
Are you creating client applications that access SharePoint data remotely? Find overviews, guidelines, and programming tasks for all three flavors of the SharePoint Foundation client object model: .NET managed, Silverlight, and ECMAScript.

Quick Note: Building WPF Applications by Using the SharePoint 2010 Client Object Model

  
Learn how to create a Windows Presentation Foundation (WPF) application that uses the SharePoint 2010 client object model to retrieve data from a SharePoint Web site.

Using the SharePoint Foundation 2010 Managed Client Object Model with the Open XML SDK 2.0

  
Write client-side applications that work with Open XML documents that are stored in document libraries by using these two technologies together.

Using the SharePoint Foundation 2010 Managed Client Object Model

  
Write applications that are based on the .NET Framework and access SharePoint content from clients without installing code on the server that runs SharePoint Foundation 2010.

Video: Overview of the SharePoint 2010 Client Object Model

  
In SharePoint 2010 there are a number of object models that can be used by developers to access the server. For example, the Client Object Model (Client OM) can be accessed via Web services, via a client (JavaScript) API, and via REST. (Length: 12:22)

Video: SharePoint 2010: ECMAScript Client Object Model

  
In this video you will learn how to use the SharePoint client object model to program a ECMAScript application against SharePoint data. (Length: 8:20)

Video: Developing .NET Applications by Using the SharePoint 2010 Client Object Model

  
This demonstration shows how to use the client object model from a console application. (Length: 8:47)

Video: SharePoint 2010 Data and the Client Object Model

  
This video provides an overview of how to use the client object model from a Windows Presentation Foundation application. (Length: 5:38)

Silverlight client object model : Read a document from a document library

  
How do I read/download a document/file from a SharePoint document library using silverlight client object model? The most closest function that I found was: Microsoft.SharePoint.Client.File.OpenBinaryDirect() but this seems to be throwing an exception "Operation not supported".

How to Add&Update the value of manage metadata field in Silverlight using sharepoint client object m

  

How to Add&Update the value of manage metadata field in Silverlight using sharepoint client object model ??

This is my code :

ClientContext clientContext = ClientContext.Current;
                Web oWebsite = clientContext.Web;
                ListCollection collList = oWebsite.Lists;
                ListItem oListItem;

                List oList = clientContext.Web.Lists.GetByTitle("Employees");

                oListItem = oList.AddItem(new ListItemCreationInformation());
                oListItem["Title"] = "My new item";

oListItem["Geography"] = "Kroea";//This is MetaData Field

oListItem.Update();

 

the oListItem["Geography"] = "Kroea" must be formatted like oListItem["Geography"] = "2;#Kroea",that code will be worked.

The "2

Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend