locked
401: Unauthorized with NLB using CRM 2011 and counter plugin RRS feed

  • Question

  • Hi,

    I have two CRM 2011 servers, let's say CRM-1 and CRM-2, with a load balance in an Azure Cloud Service.

    So, after check NLB in CRM Deployment Manager, I got this exception regarding to a counter plugin

    The Web Service plug-in failed in OrganizationId: adef92db-4bfc-e311-b51e-00155d891b52; SdkMessageProcessingStepId: 5f11dbb2-6203-e411-8a9b-00155d88c6c0; EntityName: incident; Stage: 10; MessageName: Create; AssemblyName: CIA.GI.Plugin.PreCreateCounter, CounterPlugin, Version=2.0.0.0, Culture=neutral, PublicKeyToken=20ee24e6e6f2faf4; ClassName: CIA.GI.Plugin.PreCreateCounter; Exception: Unhandled Exception: System.Net.WebException: The request failed with HTTP status 401: Unauthorized.
       at Microsoft.Crm.Extensibility.LegacySdkTypeProxyMetadataServiceWrapper.InternalInvoke(MethodInfo methodInfo, Object[] parameters)
       at CIA.GI.Plugin.PreCreateCounter.Execute(IPluginExecutionContext context)
       at Microsoft.Crm.Extensibility.V4PluginProxyStep.ExecuteInternal(PipelineExecutionContext context)
       at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)

    So, in CRM-1 I unregistered the .dll and register again, and worked because cold create a Incident using this plugin in CRM-1, but did the same for CRM-2 and didn't solve the problem is this server.

    But, then, I realized that in CRM-1 the error come back but this time randomly, I mean I this error, but if I keep clicking Save at second or third time the record is created.

    Within CRM-2 server, I can't overpass it, as in CRM-1.

    If I disable the plugin step involve in the Incident creation, I don't get the exception.However I have another assembly registered and it is running fine.

    1. Why this is happening?

    2. Which workaround/solution can I follow in order to solve this exception?

    Friday, July 4, 2014 3:14 PM

Answers

  • thanks, but it turns out that was a counter problem authentication. This plugin was for CRM 4, and was provided without source code, so instead of investigate this, we just have replaced the it for a counter compatible for CRM 2011/2013. After this, no more 401 are throw.
    Friday, July 11, 2014 10:27 AM

All replies

  • As it is the intermittent issue so it is very possible the NLB setting about "Affinity. Single". If you are using F5, then F5 has official document about the similar setting.
    http://www.f5.com/pdf/deployment-guides/dynamics-crm-2011-dg.pdf
    Persistence Type should be Cookie

    Wilson

    Wednesday, July 9, 2014 7:51 AM
  • thanks, but it turns out that was a counter problem authentication. This plugin was for CRM 4, and was provided without source code, so instead of investigate this, we just have replaced the it for a counter compatible for CRM 2011/2013. After this, no more 401 are throw.
    Friday, July 11, 2014 10:27 AM