Dynamics crm Dynamics CRM 2016在线安全/隔离模式
我在帐户实体上有一个简单的post create插件,它在SharePoint online中创建一个子网站,并使用已创建帐户的相同名称 我使用了Microsoft.SharePoint.Client.Runtime程序集中的Dynamics crm Dynamics CRM 2016在线安全/隔离模式,dynamics-crm,crm,microsoft-dynamics,dynamics-crm-online,dynamics-crm-2016,Dynamics Crm,Crm,Microsoft Dynamics,Dynamics Crm Online,Dynamics Crm 2016,我在帐户实体上有一个简单的post create插件,它在SharePoint online中创建一个子网站,并使用已创建帐户的相同名称 我使用了Microsoft.SharePoint.Client.Runtime程序集中的SharePointOnlineCredentials类登录到SharePoint实例 只要插件设置为隔离模式=none,插件就可以在本地实例上工作 当我在沙盒隔离模式下运行插件时,我得到以下错误(在线版本错误) 我想在SharePoint的联机实例上运行此插件,但我认为,
SharePointOnlineCredentials
类登录到SharePoint实例
只要插件设置为隔离模式=none
,插件就可以在本地实例上工作
当我在沙盒隔离模式下运行插件时,我得到以下错误(在线版本错误)
我想在SharePoint的联机实例上运行此插件,但我认为,我不能在隔离模式为无的情况下联机运行,是否有其他方法在联机CRM实例上使用此SharePoint程序集运行代码
消息:Create,方法:ExecutePluginLogic异常:
System.Security.SecurityException:请求类型的权限
'System.Security.Permissions.SecurityPermission,mscorlib,
版本=4.0.0.0,区域性=中性,PublicKeyToken=b77a5c561934e089'
失败。在System.Security.CodeAccessSecurityEngine.Check(对象
需求、堆栈爬网标记和堆栈标记,布尔值isPermSet)位于
System.Security.CodeAccessPermission.Demand()位于
System.Net.AuthenticationManager.Register(IAAuthenticationModule
身份验证模块)位于
Microsoft.SharePoint.Client.SharePointOnlineAuthenticationModule.EnsureRegistered()
在
Microsoft.SharePoint.Client.SharePointOnlineCredentials..ctor(字符串
用户名、SecureString密码)位于
MWLSPXRMToolkitOnline.Plugins.AccountCreate.ExecutePluginLogic(IServiceProvider
服务提供商)在
MWLSPXRMToolkitOnline.Plugins.BasePlugin.Execute(IServiceProvider
服务提供商)
失败的操作是:请求
第一个失败的权限是:
System.Security.Permissions.SecurityPermission的区域
失败的程序集是:MyComputer
不明智的是,在沙盒模式下运行时,不能包含对其他程序集的引用。您可以尝试使用ILMerge将程序集组合在一起,但如果我是您,我会采取不同的方法,例如将工作推送到外部web服务。如果使用ILMerge将程序集组合在一起(正如James Wood所建议的,因为在沙盒模式下运行时,不能包含引用),将“/copyattrs”参数与ILMerge一起使用。 如果您已在带有NuGet软件包的项目中安装了ilMarge: 在解决方案中编辑文件:ILMerge.props 更改参数:
<ILMergeAllowMultipleAssemblyLevelAttributes>true</ILMergeAllowMultipleAssemblyLevelAttributes>
<ILMergeCopyAttributes>true</ILMergeCopyAttributes>
true
真的
谢谢你的建议。我将采用您建议的外部web服务方法。