【发布时间】:2013-08-15 12:05:19
【问题描述】:
我创建了一个插件,并且注册成功(沙盒隔离模式)。
在插件执行中,我想创建一个 OrganizationServiceProxy 对象,该对象正在使用另一个 CRM 详细信息。使用下面的代码:
Uri oUri = new Uri("https://yourorg.api.crm5.dynamics.com/XRMServices/2011/Organization.svc");
//** Your client credentials
ClientCredentials clientCredentials = new ClientCredentials();
clientCredentials.UserName.UserName = "YourAccount.onmicrosoft.com";
clientCredentials.UserName.Password = "YourAdminPassword";
//Create your Organization Service Proxy
OrganizationServiceProxy _serviceProxy = new OrganizationServiceProxy(
oUri,
null,
clientCredentials,
null);
我收到安全异常:
System.Security.SecurityException:请求类型为“System.Security.Permissions.SecurityPermission, mscorlib, 版本=4.0.0.0,文化=中性,PublicKeyToken=b77a5c561934e089' 失败。
搜索了相同的问题,但没有工作,请提出建议。
【问题讨论】:
-
在这里长镜头:沙盒插件限制了对本地主机的访问(环回)。您是否在与您尝试连接的服务器相同的服务器上运行您的 CRM 组织?
-
我在 Online CRM 上使用我的插件并尝试连接另一个 Online CRM。有什么想法吗?
标签: dynamics-crm-2011 dynamics-crm dynamics-crm-online