1

I have done a lot of SharePoint out of the box customization but have no real experience in coding around SharePoint. Therefore I have a basic question.

What do I need to do (install) to be able to query a SharePoint list from an aspx website written in C#? It is actually a .NET NUKE application but it could be any other aspx solution. Do I need to install SharePoint on my development machine or is there a way to add the SharePoint dlls only?

Thank you for your help.

lektira

2

Supriyo's response is exactly what you should pursue if you are working against SharePoint 2013, whether installed locally or on the cloud. This response is to supplement rather than compete with his response.

If you are working with older versions of SharePoint (2007 or 2010), you may consider using the SOAP-based services that shipped with those editions. See the documentation here.

(Note: The SOAP services continue to exist in 2013; however, CSOM and REST are the preferred APIs for integration, and word on the street is that the SOAP services are on their way out.)

Also, there exists an ODBC driver that ships with Office that provides a convenient method to interact with list data. As you are mostly interested in integrating from ASP.NET, you probably don't want to use ODBC drivers; however, if you ever build applications within Office--particularly, from within MS Access--it may be worth your time to check out.

2
  • Thanks for your answer. In the case though, it seems I need to be running Windows Server 2003 in order to install the SP 2010 services. But I am running my current DNN project and my entire development platform on Windows 7. Any suggestions what to do? Thanks. – lektira Jan 16 '15 at 9:21
  • @lektira You don't have to have any special software installed to consume the services. SharePoint 2010 has both SOAP and REST services running by default. Use the reference kbrimington mentioned and this one too. – ErinsMatthew Jan 17 '15 at 20:53
2

The two fundamental ways to access from the client-side in SharePoint is with CSOM (Client Side Object Model) and REST. The links below can help you get started.

How to: Complete basic operations using SharePoint 2013 client library code http://msdn.microsoft.com/en-us/library/office/fp179912(v=office.15).aspx

Get started with the SharePoint 2013 REST service http://msdn.microsoft.com/EN-US/library/office/fp142380(v=office.15).aspx

SharePoint 2013: CSOM vs. REST ... My Preference and Why (why REST is better than CSOM) http://www.andrewconnell.com/blog/sharepoint-2013-csom-vs.-rest-...-my-preference-and-why

It may be helpful going over these guidelines - SharePoint 2010 Client Object Model Guidelines - http://msdn.microsoft.com/en-us/library/office/ee535717(v=office.14).aspx

2
  • Thank you both for your answers! I am however using SharePoint 2010 so I guess I should use the link below. But in any case, it is safe to assume that I do not need to have SP server installed on my local machine in order to query the list? Thanks! – lektira Jan 16 '15 at 9:18
  • that is correct - client-side coding need not have the server on the dev machine. – Supriyo SB Chatterjee Jan 16 '15 at 14:28
0

Actually I found what I was looking for. I just needed to include reference Microsoft.SharePoint.Client and then I could use all client functionalities to query the server's SharePoint list contents.

1
  • This works well too. This approach is what is called CSOM (client-side object model). – ErinsMatthew Jan 17 '15 at 20:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.