Enabling Secure Connection for Web Services: Update Bindings

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 WSBindings.config which is, by default, located in C:\Program Files\Microsoft Dynamics\GPWebServices\ServiceConfigs.

There are three sections of this config file which need to be amended, but before making any changes, take a backup of the entire file.

The first section is the basicHttpBinding section. Replicate the BasicHttpBindingTarget binding:

  • Change the name by appending SSL
  • Change the security mode to Transport
  <basicHttpBinding>
    <binding name="BasicHttpBindingTarget" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true">
      <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647"/>
      <security mode="TransportCredentialOnly">
        <transport clientCredentialType="Ntlm"/>
      </security>
    </binding>
    <binding name="BasicHttpBindingTargetSSL" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true">
      <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647"/>
      <security mode="Transport">
        <transport clientCredentialType="Ntlm"/>
      </security>
    </binding>
  </basicHttpBinding>
basicHttpBinding

The second section is the wsHttpBinding section. Replicate the WSHttpBindingTarget binding:

  • Change the name by appending SSL
  • Change the security mode to Transport
  <wsHttpBinding>
    <binding name="WSHttpBindingTarget" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true">
      <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647"/>
      <security mode="Message">
        <message clientCredentialType="Windows"/>
      </security>
    </binding>
    <binding name="WSHttpBindingTargetSSL" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true">
      <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647"/>
      <security mode="Transport">
        <message clientCredentialType="Windows"/>
      </security>
    </binding>
  </wsHttpBinding>
wsHttpBinding

The third section is the webHttpBinding section. Replicate the WebHttpBindingTarget binding:

  • Change the name by appending SSL
  • Change the security mode to Transport
  <webHttpBinding>
    <binding name="WebHttpBindingTarget" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" useDefaultWebProxy="true">
      <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647"/>
      <security mode="TransportCredentialOnly">
        <transport clientCredentialType="Ntlm"/>
      </security>
    </binding>
    <binding name="WebHttpBindingTargetSSL" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" useDefaultWebProxy="true">
      <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647"/>
      <security mode="Transport">
        <transport clientCredentialType="Ntlm"/>
      </security>
    </binding>
    <binding name="WebHttpBindingNoSecurity" maxReceivedMessageSize="2147483647" maxBufferPoolSize="2147483647" useDefaultWebProxy="true">
      <readerQuotas maxBytesPerRead="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxDepth="2147483647" maxNameTableCharCount="2147483647"/>
      <security mode="None">
      </security>
    </binding>
  </webHttpBinding>
WebHttpBindingTarget

Save the changes to the file.

What should we write about next?

If there is a topic which fits the typical ones of this site, which you would like to see me write about, please use the form, below, to submit your idea.

Your Name

Your Email

Suggested Topic

Suggestion Details

Looking for support or consultancy with Microsoft Dynamics GP?

I no longer work with Microsoft Dynamics GP, but the last company I worked for was ISC Software in the UK; if you’re looking for support or consultancy services with Microsoft Dynamics GP you can contact them here.

1 thought on “Enabling Secure Connection for Web Services: Update Bindings

Leave a Reply

Your email address will not be published. Required fields are marked *