Solved

SharePoint Service Layer

Posted on 2010-11-10
11
1,151 Views
Last Modified: 2012-05-10
Hi,
Is there another way to get hold of documents in sharepoint 2010 apart from using the Client Object Model.

I have heard of Sharepoint Service Layer (for SharePoint 2010)???

Thanks!
0
Comment
Question by:racineconde
  • 7
  • 4
11 Comments
 
LVL 8

Accepted Solution

by:
static-void earned 500 total points
ID: 34100721
Sure is, there are several ways to get documents, you can do the following:

-  use the Rest api's (http://www.synergyonline.com/blog/blog-moss/Lists/Posts/Post.aspx?ID=117)
- Use the old style webservices ie /_vti_bin/lists.asmx

If you are working solely with 2010 i recommend using the rest api as it is faster.
0
 

Author Comment

by:racineconde
ID: 34101016
I am following the demo on your link. But adding the service reference to my sharepoint site I'm getting a lot credential requests and it just doen't seem to end. Do you know how to setup the site so that I enter the credentials only once or do you know a work-around that?
0
 

Author Comment

by:racineconde
ID: 34101228
This is the error I am getting when adding the service reference:
*************************************
The HTML document does not contain Web service discovery information.
Metadata contains a reference that cannot be resolved: 'http://win2008/'.
The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Negotiate,NTLM'.
The remote server returned an error: (401) Unauthorized.
If the service is defined in the current solution, try building the solution and adding the service reference again.
**********************************************
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 8

Expert Comment

by:static-void
ID: 34108282
That message says you are trying to use the guest account for access. What system are you attempting to access this information from and what language are you using?

Cheers
0
 

Author Comment

by:racineconde
ID: 34143773
I am trying to access a sharepoint site from a console application in C#
0
 
LVL 8

Expert Comment

by:static-void
ID: 34144068
Are you running the app with a domain account which has access to sharepoint? If you are im guessing that the connection details you are using are trying to specify an authentication mode other than windows auth
0
 

Author Comment

by:racineconde
ID: 34144149
I am not using any connection details. I am trying to reference the sharepoint site "http://mysite/" or "http://mysite/_vti_bin/ListData.svc" from my console application using the SharePoint datasource object (you can a data source adding a new data source in the "Data" menu in Visual Studio 2010).

I am getting this error when trying to reference both URLs above.
0
 
LVL 8

Assisted Solution

by:static-void
static-void earned 500 total points
ID: 34144299
it works fine for me, you can actually get to the same place by right clicking your project and selecting add service reference (btw). My recommendation would be to try to open this url in a browser, make sure it returns something and doesnt prompt for authentication. If its prompting for auth try running VS under an account which has access to your SharePoint site.
0
 

Author Comment

by:racineconde
ID: 34144693
The ListData.svc is used to interact with lists. Do you the service for interacting with document librarirs and documents?
0
 

Author Comment

by:racineconde
ID: 34144885
Never mind, I found out.
0
 

Author Closing Comment

by:racineconde
ID: 34153896
I had to run a few patches that I found about from other blogs on top the solution provided in this post
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Note:  There are two main ways to deploy InfoPath forms:  Server-side and directly through the SharePoint site.  Deploying a server-side InfoPath form means the form is approved by the Administrator, thus allowing greater functionality in the form. …
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question