Author: Thomas Zühlke

Accessing MS Project Server with ProjectContext and ADFS

If you need to access Microsoft Project Server, you can use the ProjectContext class from the Microsoft.ProjectServer.Client.dll assembly. This class inherits from the SharePoint ClientContext: using System; using Microsoft.SharePoint.Client; namespace Microsoft.ProjectServer.Client { public class ProjectContext : ClientContext {… and adds a few new methods and properties. If your SharePoint is running with ADFS, you can…

File.OpenBinaryDirect throws error 401/403 in SharePoint 2013 Provider Hosted App (Add-Ins)

I was trying to get a file from a SharePoint document library (host-web) with the .NET Client Object Model (CSOM) in a provider hosted app. I used the OpenBinaryDirect method from the File-class. Code Snippet List spList = ctx.Web.Lists.GetByTitle(“Dokumente”); CamlQuery camlQuery = new CamlQuery {ViewXml = String.Format(@”<View>          <Query>             <Where><Eq><FieldRef Name=’FileLeafRef’ /><Value Type=’File’>{0}</Value></Eq></Where>        …