【问题标题】:CRM 2015 on premise: Plugin Profiler errorCRM 2015 内部部署:插件分析器错误
【发布时间】:2017-04-25 16:57:10
【问题描述】:

注意:由于限制,我们不能使用远程调试器。

我过去曾使用过插件分析器,但从未遇到此错误或任何问题。

我尝试了 Aileen 的一些解决方案,但没有运气。 (http://missdynamicscrm.blogspot.com/2014/05/debug-crm-2013-using-plugin-profiler.html)

在我的新作业中遇到以下错误。有人知道怎么回事吗?

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Unexpected Exception in the Plug-in ProfilerDetail: 
<OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts">
  <ErrorCode>-2147220891</ErrorCode>
  <ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic">
    <KeyValuePairOfstringanyType>
      <d2p1:key>OperationStatus</d2p1:key>
      <d2p1:value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string">3</d2p1:value>
    </KeyValuePairOfstringanyType>
    <KeyValuePairOfstringanyType>
      <d2p1:key>SubErrorCode</d2p1:key>
      <d2p1:value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string">-2146233088</d2p1:value>
    </KeyValuePairOfstringanyType>
  </ErrorDetails>
  <Message>Unexpected Exception in the Plug-in Profiler</Message>
  <Timestamp>2017-04-25T16:46:17.1055295Z</Timestamp>
  <InnerFault i:nil="true" />
  <TraceText>

[PluginProfiler.Plugins: PluginProfiler.Plugins.ProfilerPlugin]
[fd941d99-d629-e711-810c-005056ab45d6: ABCcorp.Xrm.MyProject.Plugins.MyPlugin: Pre Update of new_myentity with Pre Image (Profiler)]

An exception occurred during the initialization of the Plug-in Profiler.
Unhandled Exception: System.ServiceModel.CommunicationObjectFaultedException: The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it is in the Faulted state.

Server stack trace: 
   at System.ServiceModel.Channels.CommunicationObject.ThrowIfDisposedOrImmutable()
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)

Exception rethrown at [0]: 
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&amp; msgData, Int32 type)
   at System.ServiceModel.ICommunicationObject.Open()
   at Microsoft.Crm.Sandbox.SandboxClientBase`1.Open()
   at Microsoft.Crm.Sandbox.SandboxClientBase`1.get_Proxy()
   at Microsoft.Crm.Sandbox.SandboxOrganizationService.ProcessException(Exception e, SandboxSdkClient client)
   at Microsoft.Crm.Sandbox.SandboxOrganizationService.Execute(String operation, Byte[] serializedRequest)
   at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]&amp; outArgs)
   at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)

Exception rethrown at [1]: 
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&amp; msgData, Int32 type)
   at Microsoft.Crm.Sandbox.ISandboxOrganizationService.Execute(String operation, Byte[] serializedRequest)
   at Microsoft.Crm.Sandbox.SandboxOrganizationServiceWrapper.ExecuteInternal(OrganizationRequest request)
   at Microsoft.Crm.Sandbox.SandboxOrganizationServiceWrapper.RetrieveInternal(String entityName, Guid id, ColumnSet columnSet)
   at Microsoft.Crm.Sandbox.SandboxOrganizationServiceWrapper.Retrieve(String entityName, Guid entityId, ColumnSet columnSet)
   at PluginProfiler.Plugins.PluginLoaderUtility.RefreshAssembly(IOrganizationService service, ProfilerConfiguration config, PluginInitializationContext context)
   at PluginProfiler.Plugins.PluginLoaderUtility.RefreshPluginInitializationContext(IOrganizationServiceFactory factory, ProfilerConfiguration config, PluginInitializationContext currentContext)
   at PluginProfiler.Plugins.ProfilerBase`1.InitializeProfiler(Dictionary`2 services, T operationContext, ProfilerPluginContext&amp; context)



</TraceText>
</OrganizationServiceFault>

【问题讨论】:

  • 这发生在安装分析器、分析插件步骤并通过 CRM UI 更新重现插件执行场景之后。
  • 是在线 CRM 还是本地 CRM?
  • 抱歉,我从标题中看到它是在前提下的!
  • 我们尝试了不同的 SDK 版本,但同样的问题仍然存在。是否有任何其他方向可以解决此错误 - 我们的许多开发人员都在努力解决这个问题:(
  • 我会考虑向 Microsoft 提出此问题,因为沙盒处理服务似乎存在问题。可能特定于您使用的 CRM 版本

标签: dynamics-crm dynamics-crm-2015


【解决方案1】:

一些想法......

  1. 您从哪个版本的 SDK 使用 Plugin Profiler?与CRM的版本是否匹配?

  2. 我通常希望我的插件代码也可以通过控制台应用程序使用,这样我就可以在不进行任何分析、远程调试等的情况下进行调试和单步调试。

本文介绍了如何开始使用连接到 CRM 的控制台应用程序:https://msdn.microsoft.com/en-us/library/jj602970.aspx

我的典型架构是有一个包含所有业务逻辑的 Visual Studio 共享项目,然后是一个插件项目和一个控制台项目,每个项目都获取目标记录并将其传递到共享项目中。

例如: a visual studio folder containing typical plugin projects

【讨论】:

  • 实际上我们的 crm 是 2015 onpremise 7.0,但我们尝试使用最新的 sdk 2015 7.1 和 365 sdk - 没有任何效果。
【解决方案2】:

您的沙盒处理服务似乎处于故障状态。我会重新启动该过程,因为这通常可以解决问题。该服务应该与异步处理服务在同一个盒子上,但我相信可以在不同的位置。

无论哪种方式,找到并重新启动“Microsoft Dynamics CRM 沙盒处理服务”

如果这不起作用,请重新启动它所在的盒子。

这通常可以解决问题。

【讨论】:

  • 谢谢@Conor。虽然我过去这样做过..我现在又试了一次,但没有运气。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-10-25
  • 2015-11-23
  • 1970-01-01
  • 2014-01-31
  • 1970-01-01
相关资源
最近更新 更多