Skip to main content
added 2 characters in body
Source Link
Vadim Gremyachev
  • 42.6k
  • 3
  • 88
  • 169

I am trying to do.

Microsoft.SharePoint.Client.File.OpenBinaryDirect(context,relativeUrl) 

Always get "forbidden" and unauthorized.

However If i use same context and url to do web.getFileByServerRelativeUrl()web.getFileByServerRelativeUrl() it works as expected.

That assures me, it should not be context or url issue.

Has anyone encountered this before?

I am trying to do.

Microsoft.SharePoint.Client.File.OpenBinaryDirect(context,relativeUrl) 

Always get "forbidden" and unauthorized.

However If i use same context and url to do web.getFileByServerRelativeUrl() it works as expected.

That assures me, it should not be context or url issue.

Has anyone encountered this before?

I am trying to do.

Microsoft.SharePoint.Client.File.OpenBinaryDirect(context,relativeUrl) 

Always get "forbidden" and unauthorized.

However If i use same context and url to do web.getFileByServerRelativeUrl() it works as expected.

That assures me, it should not be context or url issue.

Has anyone encountered this before?

Source Link

Sharepoint provider hosted app Microsoft.SharePoint.Client.File.OpenBinaryDirect does not work

I am trying to do.

Microsoft.SharePoint.Client.File.OpenBinaryDirect(context,relativeUrl) 

Always get "forbidden" and unauthorized.

However If i use same context and url to do web.getFileByServerRelativeUrl() it works as expected.

That assures me, it should not be context or url issue.

Has anyone encountered this before?