I want to connect to my sharepoint site and get a specific list. I found the official docs and tried this:
ClientContext ctx = new ClientContext("https://factionxyz0.sharepoint.com/sites/faktion-devs");
Web web = ctx.Web;
List fileList = web.Lists.GetByTitle("TestLijst MicrosoftFlow");
CamlQuery query = CamlQuery.CreateAllItemsQuery(100);
ListItemCollection items = fileList.GetItems(query);
ctx.Load(items);
try
{
ctx.ExecuteQuery();
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
Console.WriteLine(ex.InnerException);
return req.CreateErrorResponse(HttpStatusCode.BadRequest, ex);
}
but this just gives me the following error:
Method not found: 'Void System.Xml.XmlSecureResolver..ctor(System.Xml.XmlResolver, System.Security.PermissionSet)'.
I don't understand why or what is triggering this exception (I'm running this as an Azure Function)
Microsoft.SharePoint.Client package version: 14.0.4762.1000
