Wednesday, October 19, 2016

HTTP vs HTTPS binding in Dynamic AX WCF service configuration

We might think that it is quite easy to swtich from HTTP to HTTPS in the WCF Service binding configuration, as we just simply replace the HTTP in http:// WCFServiceServer/WCFServce.svc  to HTTPS https:// WCFServiceServer/WCFServce.svc

when you launch the app and call the wcf service, you will encounter an exception during the service consumption.

it is little difference between the HTTP vs HTTPS binding in DAX WCF service configuration. this is better approach to have two configurations enable in the web.config file. I highlight the difference in bold.

one is the basicHttpBinding for http link

<basicHttpBinding>
        <binding name="reqReplyEndpoint">
          <security mode="TransportCredentialOnly">
            <transport clientCredentialType="Windows" />
          </security>
        </binding>
        <binding name="DaxBinding" closeTimeout="00:01:00" openTimeout="00:01:00"
          receiveTimeout="00:01:00" sendTimeout="00:01:00" maxReceivedMessageSize="2147483647">
          <readerQuotas maxDepth="32" maxStringContentLength="2147483647"
            maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
          <security mode="TransportCredentialOnly">
            <transport clientCredentialType="Windows" />
          </security>
        </binding>
      </basicHttpBinding>


another is basicHttpsBinding for https link

      <basicHttpsBinding>
        <binding name="SecurereqReplyEndpoint">
          <security mode="Transport">
            <transport clientCredentialType="Windows" />
          </security>
        </binding>
        <binding name="DaxSecureBinding" closeTimeout="00:01:00" openTimeout="00:01:00"
          receiveTimeout="00:01:00" sendTimeout="00:01:00" maxReceivedMessageSize="2147483647">
          <readerQuotas maxDepth="32" maxStringContentLength="2147483647"
            maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
          <security mode="Transport">
            <transport clientCredentialType="Windows" />
          </security>
        </binding>
      </basicHttpsBinding>


No comments:

Post a Comment