Ajay Mavatkar

Ajay Mavatkar

  • NA
  • 68
  • 11.6k

Add items to share point

Jun 29 2018 12:22 AM
Hi,
 
I need to insert items to sharepoint list from webform.
 
However I tried the following code .
 
ClientContext ctx = new ClientContext("https://hp.sharepoint.com/sites/test");
ctx.Credentials = new SharePointOnlineCredentials(username, securePassword);
ctx.RequestTimeout = 180000;
Microsoft.SharePoint.Client.List list = ctx.Web.Lists.GetByTitle("test-1");
Microsoft.SharePoint.Client.ListItem items = list.AddItem(new ListItemCreationInformation());
items["Title"] = "Feedback";
items.Update();
ctx.ExecuteQuery();
 
Am getting the following error.
 
'The request was aborted: Could not create SSL/TLS secure channel'
 
Please help me in resolving this issue

Answers (3)