Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

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 b

Posted on by Microsoft Employee

Hi, I have a Dynamics 2016 on premises, from which I can not debug plugins, scheduled tracing was disabled and I reactivated, I'm using the compatible plugin registration version, but the profiles still do not contain the serialized value for the debug.

follows the error details generated with the following error.

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Unexpected Exception in the Plug-in ProfilerDetail:
<OrganizationServiceFault xmlns:i="www.w3.org/.../XMLSchema-instance" xmlns="schemas.microsoft.com/.../Contracts">
  <ErrorCode>-2147220891</ErrorCode>
  <ErrorDetails xmlns:d2p1="schemas.datacontract.org/.../System.Collections.Generic">
    <KeyValuePairOfstringanyType>
      <d2p1:key>OperationStatus</d2p1:key>
      <d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string">3</d2p1:value>
    </KeyValuePairOfstringanyType>
    <KeyValuePairOfstringanyType>
      <d2p1:key>SubErrorCode</d2p1:key>
      <d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string">-2146233088</d2p1:value>
    </KeyValuePairOfstringanyType>
  </ErrorDetails>
  <Message>Unexpected Exception in the Plug-in Profiler</Message>
  <Timestamp>2019-05-03T17:29:48.2590219Z</Timestamp>
  <InnerFault i:nil="true" />
  <TraceText>

[PluginProfiler.Plugins: PluginProfiler.Plugins.ProfilerPlugin]
[52e141a3-c66d-e911-80e7-0050568d3952: Plugins.EventPipelines.PreOperation.CreateOcorrencia: Create of incident (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.SandboxCallbackService.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>


*This post is locked for comments

  • bravoreddy Profile Picture
    bravoreddy 67 on at
    RE: 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 communicati

    Hello Alef,

    I am also facing the same issue for Dev and Test environments, Thanks for sharing the information above that you have contacted Microsoft and issue got resolved for you.

    my question here is

    setspn -s HTTP / servername domain \ user

    what is the server name here(is it servername or crm url)

    Please share your suggestion here .

    Regards,

    Bravo

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: 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 communicati

    After a hard search with no success, I requested the support of microsoft and the problem was solved.

    Causes:

    First) Trace scheduling was disabled, thus preventing access to the plug-in profiler.

    Second) erroneous spn configurations that impacted the server's Kerberos protocol, thus blocking profiler access to capture information from the organization to generate the serialized value for debugging.

    With admin access was executed in cmd the commands:

    setspn -S HTTP / servername domain \ user

    setspn -S HTTP / servername.fqdn urldomain \ user

    setspn -S HTTP / servername domain \ user

    setspn -S HTTP / domainurl domain \ user

    Solving my problem,

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: 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 communicati

    Kokulan Eswaranathan, thanks for the reply.

    But unfortunately the error persists, it's as if something on the server blocked the profiler's communication, I noticed that the System.ServiceModel.Channels.ServiceChannel file did not exist in the bin folder of dynamics.

    Even replacing the file, communication does not yet exist.

    generating the exception:

    An exception occurred during the initialization of the Plug-in Profiler.

    Unhandled Exception: System.ServiceModel.CommunicationObjectFaultedException: The communication object, System.ServiceModel.Channels.ServiceChannel, can not be used for communication because it is in the Faulted state.

  • Kokulan Profile Picture
    Kokulan 18,048 on at
    RE: 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 communicati

    Please refer to the link below and see if that helps at all

    stackoverflow.com/.../the-communication-object-system-servicemodel-channels-servicechannel-cannot-be

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans