在沙盒CRM 2013 Online插件中使用SharePoint 2013的客户端对象模型的RegistryPermission异常

时间:2013-11-29 09:17:42

标签: authentication plugins sandbox sharepoint-2013 dynamics-crm-2013

我正在尝试从CRM 2013 Online中的沙盒插件中连接到SharePoint 2013 Online(使用CSOM)。为此,我将SharePoint Client和Client.Runtime DLL与ilmerge.exe合并到我的插件DLL中。但是只要下面的代码:

_context = new ClientContext(spSiteUrl)
{
    Credentials = new SharePointOnlineCredentials(username, securePassword)
};

尝试创建SharepointOnlineCredentials因为Sandbox限制而引发异常:

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

是否有人解决了此问题,或者是否有其他选项可供CSOM使用SharePoint 2013 Online进行身份验证?

0 个答案:

没有答案