Enabling Secure Connection for Web Services: Update Legacy Endpoint

July 25th, 2018 by

Microsoft Dynamics GPThis post is part of the Enabling Secure Connection for Web Services series.

There are several configuration files which need to be amended to enable a secure connection for Web Services. The first is a href=’There are several configuration files which need to be amended to enable a secure connection for Web Services. The first is WSBindings.config; the second is the legacy endpoint config file, DynamicsGPLegacy.config which is, by default, located in C:Program FilesMicrosoft DynamicsGPWebServicesServiceConfigs.

There are three elements which need to be updated in the services node:

  1. Change the behaviorConfiguration node from GPLegacyStaticMetadataBehavior to GPDynamicMetadataBehavior.
  2. Change the bindingConfiguration node from BasicHttpBindingTarget to BasicHttpBindingTargetSSL.
  3. Add a new https baseAddress line using the new port and the externally accessible DNS hostname:
    <add baseAddress="https://SERVER.msdynamicsgp.co.uk:48666/DynamicsGPWebServices"/>
   <services>
      <service name="Microsoft.Dynamics.GP.WebServices.LegacyContract.DynamicsGP" behaviorConfiguration="GPDynamicMetadataBehavior">
        <endpoint address="Mex" name="http" binding="customBinding" bindingConfiguration="CustomBinding" contract="IMetadataExchange"/>
        <endpoint address="DynamicsGPService.asmx" name="LegacyDynamicsGP" binding="basicHttpBinding" bindingConfiguration="BasicHttpBindingTargetSSL" contract="Microsoft.Dynamics.GP.WebServices.LegacyContract.IGPServicesLegacy"/>
        <host>
          <baseAddresses>
            <add baseAddress="http://SERVER:48620/DynamicsGPWebServices"/>
            <add baseAddress="https://SERVER.msdynamicsgp.co.uk:48666/DynamicsGPWebServices"/>
          </baseAddresses>
        </host>
      </service>
    </services>

DynamicsGPLegacy.config

There is one element which need to be updated in the behaviors node:

  1. Change the behaviorConfiguration elements under behaviour node from httpGetEnabled to httpsGetEnabled.
        <behavior name="GPDynamicMetadataBehavior">
          <serviceThrottling maxConcurrentSessions="1024"/>
          <serviceMetadata httpsGetEnabled="true"/>
          <serviceDebug includeExceptionDetailInFaults="true"/>
          <dataContractSerializer maxItemsInObjectGraph="2147483647"/>
          <serviceCredentials>
            <userNameAuthentication cacheLogonTokens="true"/>
          </serviceCredentials>
        </behavior>
DynamicsGPLegacy.config

Save the changes to the configuration file.

Click to show/hide the Enabling Secure Connection for Web Services Series Index

Read original post Enabling Secure Connection for Web Services: Update Legacy Endpoint at azurecurve|Ramblings of a Dynamics GP Consultant

Source: azurecurve

Leave a Reply