In this project i am creating an asp.net web application and connecting this web application to Sharepoint 2013 site
You need to install Client Object Model SDK
1. https://www.microsoft.com/en-us/download/details.aspx?id=35585 - Sharepoint 2013
2. https://www.microsoft.com/en-us/download/details.aspx?id=21786 - Sharepoint 2010
Two imp dll that we need to reference in your project are:
1. Microsoft.SharePoint.Client
2. Microsoft.SharePoint.Client.Runtime
When you install SP2010 SDK , the two dll are found in the below folder,
C:\Program Files\Common Files\microsoft shared\SharePoint Client
When you install SP2010 SDK , the two dll are found in the below folder,
C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI
String Url = "https://sharepointsitename";
ClientContext context = new ClientContext(url);
context.Credentials = credentials;
Web oWebsite = context.Web;
context.Load(oWebsite);
context.ExecuteQuery();
lblsitename.Text = oWebsite.Title + " Site is connected";