Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1188
  • Last Modified:

SharePoint Service Layer

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
racineconde
Asked:
racineconde
  • 7
  • 4
2 Solutions
 
static-voidCommented:
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
 
racinecondeAuthor Commented:
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
 
racinecondeAuthor Commented:
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
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
static-voidCommented:
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
 
racinecondeAuthor Commented:
I am trying to access a sharepoint site from a console application in C#
0
 
static-voidCommented:
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
 
racinecondeAuthor Commented:
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
 
static-voidCommented:
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
 
racinecondeAuthor Commented:
The ListData.svc is used to interact with lists. Do you the service for interacting with document librarirs and documents?
0
 
racinecondeAuthor Commented:
Never mind, I found out.
0
 
racinecondeAuthor Commented:
I had to run a few patches that I found about from other blogs on top the solution provided in this post
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 7
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now