none
WCF Custom adpter configuration to CRM RRS feed

  • Question

  • Hi,

    I am using WCF-Custom send port to communicate to CRM WCFService. I am getting the below error. I am not able to edit any properties. 

    Error Description: System.Configuration.ConfigurationErrorsException: The binding at system.serviceModel/bindings/ws2007HttpBinding does not have a configured binding named 'UserNameWSTrustBinding_IWSTrust13Async1'. This is an invalid value for bindingConfiguration.
       at System.ServiceModel.Configuration.BindingsSection.ValidateBindingReference(String binding, String bindingConfiguration, ContextInformation evaluationContext, ConfigurationElement configurationElement)
       at System.ServiceModel.Configuration.IssuedTokenParametersEndpointAddressElement.Validate()
       at System.ServiceModel.Configuration.IssuedTokenParametersElement.ApplyConfiguration(IssuedSecurityTokenParameters parameters)
       at System.ServiceModel.Configuration.IssuedTokenParametersElement.Create(Boolean createTemplateOnly, SecurityKeyType templateKeyType)
       at System.ServiceModel.Configuration.SecurityElementBase.CreateBindingElement(Boolean createTemplateOnly)
       at System.ServiceModel.Configuration.SecurityElement.CreateBindingElement(Boolean createTemplateOnly)
       at System.ServiceModel.Configuration.SecurityElementBase.CreateBindingElement()
       at System.ServiceModel.Configuration.CustomBindingElement.OnApplyConfiguration(Binding binding)
       at System.ServiceModel.Configuration.CustomBindingElement.ApplyConfiguration(Binding binding)
       at Microsoft.BizTalk.Adapter.Wcf.Converters.BindingFactory.CreateBinding(String wcfExtensions, String bindingName, String bindingConfiguration, String bindings)
       at Microsoft.BizTalk.Adapter.Wcf.Config.CustomTLConfig.CreateBinding(THConfig thConfig)
       at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.InitializeValues(IBaseMessage message)
       at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2..ctor(IBaseMessage message, WcfTransmitter`2 transmitter)
       at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfTransmitter`2.GetClientFromCache(String spid, IBaseMessage message)
       at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfAsyncBatch`2.BatchWorker(List`1 messages)

    Saturday, September 20, 2014 3:51 PM

Answers

  • Hi,

    This error means that custom binding extension (UserNameWSTrustBinding_IWSTrust13Async1) for a WCF-Custom transport was not configured properly. You need to perform following steps:

    • Ensure the machine.config file in %WinDir%\Microsoft.NET\Framework\v4.0.30319\Config has the <bindingExtensions> element configured properly.
    • In Windows Explorer, go to %WinDir%\Assembly, and make sure the assemblies implementing the custom binding extension are installed properly.
    • For the WCF-Custom adapter, in the BizTalk Administration console, restart the host instance running the WCF transport.
    • If you still did not find the binding for your WCF-Custom than first point (machine.config) still applies. You need to check the settings in your machine.config file again.

      I hope this helps.

    • For reference see BizTalk Adapter Pack 2.0 installation guide (section register bindings).

      Rachit

      If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.


    Saturday, September 20, 2014 5:50 PM
    Moderator

All replies

  • Hi,

    This error means that custom binding extension (UserNameWSTrustBinding_IWSTrust13Async1) for a WCF-Custom transport was not configured properly. You need to perform following steps:

    • Ensure the machine.config file in %WinDir%\Microsoft.NET\Framework\v4.0.30319\Config has the <bindingExtensions> element configured properly.
    • In Windows Explorer, go to %WinDir%\Assembly, and make sure the assemblies implementing the custom binding extension are installed properly.
    • For the WCF-Custom adapter, in the BizTalk Administration console, restart the host instance running the WCF transport.
    • If you still did not find the binding for your WCF-Custom than first point (machine.config) still applies. You need to check the settings in your machine.config file again.

      I hope this helps.

    • For reference see BizTalk Adapter Pack 2.0 installation guide (section register bindings).

      Rachit

      If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.


    Saturday, September 20, 2014 5:50 PM
    Moderator
  • Yes. There is no <bindingExtensions> elements under <system.servicemodel> in machine.config file. 
    Saturday, September 20, 2014 6:54 PM
  • Yes, in that case you need to register your bindings before you can use them in Admin console.

    You need to perform all the steps I have mentioned above to make things work for you.

    You can also follow the installation guide (section register bindings) for detailed step-wise explanation.

    I hope this helps.

    Rachit

    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.


    Saturday, September 20, 2014 7:41 PM
    Moderator
  • In this section, I could see only siebel, sql and other bindings. Actually, I have configured WCF-Custom port in another system. When I compared the machine.config file in both the system the below section is missing

    <bindings>
          <ws2007HttpBinding>
            <binding name="UserNameWSTrustBinding_IWSTrust13Async1" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
              <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384"/>
              <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false"/>
              <security mode="TransportWithMessageCredential">
                <transport clientCredentialType="None" proxyCredentialType="None" realm=""/>
                <message clientCredentialType="UserName" negotiateServiceCredential="true" algorithmSuite="Default" establishSecurityContext="false"/>
              </security>
            </binding>
          </ws2007HttpBinding>
        </bindings>

    I just modified my machine.config file with these entries. But I am getting different error now. 

    Error details: System.ServiceModel.Security.MessageSecurityException: An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail. ---> System.ServiceModel.FaultException: ID3242: The security token could not be authenticated or authorized

    Saturday, September 20, 2014 7:56 PM
  • Laxme,

    Seems like you're missing the deployment steps for WCF extensions. Follow the steps listed in this MSDN article for deployment,

    How to Enable the WCF Extensibility Points with the WCF Adapters


    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

    Saturday, September 20, 2014 8:04 PM
  • Looks like a authentication issue.

    Few check points:

    1) Have you tried browsing the service you trying to post messages to?

    2) Any certificate installation you missing?

    Rachit

    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.


    Saturday, September 20, 2014 8:33 PM
    Moderator
  • I am able to browse the service from my system. I am connecting to CRM WCF service. Sorry I have no idea how to deploy WCF Extensions for this.

    https://mu2cert.domain.com/XRMServices/2011/Organization.svc

    Sunday, September 21, 2014 7:08 AM
  • Laxme,

    As suggested by M.R.AshwinPrabhu,. in his post below.

    http://social.msdn.microsoft.com/Forums/en-US/c94dd38a-7322-4286-8dc6-e1e57c0c22c4/getting-error-while-try-to-create-an-record-in-crm-2011-from-biztalk-2010?forum=biztalkgeneral

    Try following steps:

    First make sure basic are correct:

    • Ensure the security configuration in your WCF send port are correct.
    • Make sure your binding matches with the client's binding.

    Follow these solutions:

    • In many user's cases this issue is also due to clock's synchronization. Try as mentioned in the below mentioned link in reference section.
    • If the above doesn't work try this

    Reference:

    http://weblogs.asp.net/pabloperalta/archive/2012/05/14/quot-an-error-occurred-when-verifying-security-for-the-message-quot-when-executing-savechanges.aspx

    WCF Message Authentication Failure

    http://parwej.wordpress.com/2009/09/04/an-unsecured-or-incorrectly-secured-fault-was-received-from-the-other-party/

    Adding to it, i would also suggest to check the certificate, it should be there in "trusted root provider" folder.

     

    Rachit

    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

    Sunday, September 21, 2014 8:19 AM
    Moderator