Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 79901

Not able to get file stream from the sharepoint file url.

$
0
0

I have requirement to get file stream of share point file, for the that I have share point file URL.

"sharepointsite.com/.../File01_07262017.pdf"

I’m trying to connect to SharePoint Online (using CSOM) from within a plugin in CRM Online . For that to work, I merged the SharePoint Client and Client.Runtime DLL’s with ilmerge.exe into my plugin DLL. But as soon as the following code:

ClientContext clientContext = new ClientContext(server);

clientContext.Credentials = new SharePointOnlineCredentials(UserId, Password); //This line throws an below exception:

Request for the permission of type ‘System.Security.Permissions.RegistryPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089′ failed.

Is there any way to make it working? 

Thanks,

Krutesh


Viewing all articles
Browse latest Browse all 79901

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>