Click here to Skip to main content
15,886,689 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have searched several sites for answers to this question but none of the solutions seem to be working.
I have a web application and it is accessing several service endpoints. The services were built in a separate project from the web application the application and services run fine in http and on the localhost but error out on the production servers when using https.

The services config file system.service model section is as follows...

'''
XML
<system.serviceModel>
        <serviceHostingEnvironment aspNetCompatibilityEnabled="false" />
  <behaviors>
            <serviceBehaviors>
                <behavior name="Magic.BusinessService.ServiceImplementation.MagicContactService_Behavior">
                    <serviceDebug includeExceptionDetailInFaults="true" />
                    <serviceMetadata httpGetEnabled="true" />
                </behavior>
                <behavior name="Magic.BusinessService.ServiceImplementation.MagicFeedbackService_Behavior">
                    <serviceDebug includeExceptionDetailInFaults="false" />
                    <serviceMetadata httpGetEnabled="true" />
                </behavior>
                <behavior name="Magic.BusinessService.ServiceImplementation.MagicResponseService_Behavior">
                    <serviceDebug includeExceptionDetailInFaults="true" />
                    <serviceMetadata httpGetEnabled="true" />
                </behavior>
            </serviceBehaviors>
        </behaviors>
        <bindings>
            <basicHttpBinding>
                <binding name="ContactInformationRepositoryHttpEndpoint" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="5242880" maxBufferPoolSize="524288" maxReceivedMessageSize="5242880" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
                    <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                    <security mode="Transport">
                        <transport clientCredentialType="None" proxyCredentialType="None" realm="" />
                        <message clientCredentialType="UserName" algorithmSuite="Default" />
                    </security>
                </binding>
                <binding name="LargeBuffer" maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647">
                    <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
          <security mode="Transport">
            <transport clientCredentialType="None" proxyCredentialType="None" realm=""/>
            <message clientCredentialType="UserName" algorithmSuite="Default" />
          </security>
                </binding>
            </basicHttpBinding>
        </bindings>
        <client>
      <!--<endpoint address="http://sena-devapps.wdw.disney.com/Cir.BusinessService.Host/ContactInformationRepository.svc"-->
      <endpoint address="https://shdcvdswa0510.apac.wdpr.disney.com/Cir.BusinessService.Host/ContactInformationRepository.svc" binding="basicHttpBinding" bindingConfiguration="ContactInformationRepositoryHttpEndpoint" contract="CIRService.ContactInformationRepositoryServiceContract" name="ContactInformationRepositoryHttpEndpoint" />
    </client>
        <services>
   <service behaviorConfiguration="Magic.BusinessService.ServiceImplementation.MagicContactService_Behavior" name="Magic.BusinessService.ServiceImplementation.MagicContactService">
    <endpoint address="" binding="basicHttpBinding" bindingConfiguration="LargeBuffer" name="MagicContactHttpEndpoint" bindingNamespace="urn:Magic.BusinessService.ServiceContractModel" contract="Magic.BusinessService.ServiceContracts.IMagicContactServiceContract" />
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
   </service>
   <service behaviorConfiguration="Magic.BusinessService.ServiceImplementation.MagicFeedbackService_Behavior" name="Magic.BusinessService.ServiceImplementation.MagicFeedbackService">
    <endpoint address="" binding="basicHttpBinding" name="MagicFeedbackHttpEndpoint" bindingNamespace="urn:Magic.BusinessService.ServiceContractModel" contract="Magic.BusinessService.ServiceContracts.IMagicFeedbackServiceContract" />
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
   </service>
   <service behaviorConfiguration="Magic.BusinessService.ServiceImplementation.MagicResponseService_Behavior" name="Magic.BusinessService.ServiceImplementation.MagicResponseService">
    <endpoint address="" binding="basicHttpBinding" bindingConfiguration="LargeBuffer" name="MagicResponseHttpEndpoint" bindingNamespace="urn:Magic.BusinessService.ServiceContractModel" contract="Magic.BusinessService.ServiceContracts.IMagicResponseServiceContract" />
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
   </service>
  </services>
    </system.serviceModel>


'''

The web application config file system.servicemodel section is as follows...

'''
XML
<system.serviceModel>
            <bindings>
      <basicHttpBinding>
        <binding name="wsSoap" closeTimeout="00:01:00" openTimeout="00:01:00"
          receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false"
          bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
          maxBufferSize="1055360" maxBufferPoolSize="524288" maxReceivedMessageSize="1055360"
          messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
          useDefaultWebProxy="true">
          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
            maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <security mode="None">
            <transport clientCredentialType="Transport" proxyCredentialType="None"
              realm="" />
            <message clientCredentialType="UserName" algorithmSuite="Default" />
          </security>
        </binding>
        <binding name="MagicContactHttpEndpoint" closeTimeout="00:01:00"
          openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
          allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
          maxBufferSize="1055360" maxBufferPoolSize="524288" maxReceivedMessageSize="1055360"
          messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
          useDefaultWebProxy="true">
          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
            maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <security mode="Transport">
            <transport clientCredentialType="None" proxyCredentialType="None"
              realm="" />
            <message clientCredentialType="UserName" algorithmSuite="Default" />
          </security>
        </binding>
        <binding name="MagicFeedbackHttpEndpoint" closeTimeout="00:01:00"
          openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
          allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
          maxBufferSize="1055360" maxBufferPoolSize="524288" maxReceivedMessageSize="1055360"
          messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
          useDefaultWebProxy="true">
          <readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="16384"
            maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <security mode="Transport">
            <transport clientCredentialType="None" proxyCredentialType="None"
              realm="" />
            <message clientCredentialType="UserName" algorithmSuite="Default" />
          </security>
        </binding>
        <binding name="MagicResponseHttpEndpoint" closeTimeout="00:01:00"
          openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
          allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
          maxBufferSize="2000000" maxBufferPoolSize="2000000" maxReceivedMessageSize="2000000"
          messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
          useDefaultWebProxy="true">
          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
            maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <security mode="Transport">
            <transport clientCredentialType="None" proxyCredentialType="None"
              realm="" />
            <message clientCredentialType="UserName" algorithmSuite="Default" />
          </security>
        </binding>
        <binding name="wsSoap1" closeTimeout="00:01:00" openTimeout="00:01:00"
          receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false"
          bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
          maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
          messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
          useDefaultWebProxy="true">
          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
            maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <security mode="Transport">
            <transport clientCredentialType="None" proxyCredentialType="None"
              realm="" />
            <message clientCredentialType="UserName" algorithmSuite="Default" />
          </security>
        </binding>
        <binding name="wsSoap2" closeTimeout="00:01:00" openTimeout="00:01:00"
          receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false"
          bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
          maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
          messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
          useDefaultWebProxy="true">
          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
            maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <security mode="Transport">
            <transport clientCredentialType="None" proxyCredentialType="None"
              realm="" />
            <message clientCredentialType="UserName" algorithmSuite="Default" />
          </security>
        </binding>
        <binding name="MagicResponseHttpEndpoint1" closeTimeout="00:01:00"
          openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
          allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
          maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
          messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
          useDefaultWebProxy="true">
          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
            maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <security mode="Transport">
            <transport clientCredentialType="None" proxyCredentialType="None"
              realm="" />
            <message clientCredentialType="UserName" algorithmSuite="Default" />
          </security>
        </binding>
      </basicHttpBinding>
    </bindings>
    <client>
      <!-- <endpoint address="http://keystonedev-east.disney.com/AuthorizationService/ws.asmx"
        binding="basicHttpBinding" bindingConfiguration="wsSoap" contract="KeystoneAuth.wsSoap"
        name="wsSoap" /> -->
      <endpoint address="https://shdcvdswa0510.apac.wdpr.disney.com/Magic.BusinessService.Host/MagicResponseService.svc"
        binding="basicHttpBinding" bindingConfiguration="MagicResponseHttpEndpoint"
        contract="MagicResponseService.MagicResponseServiceContract"
        name="MagicResponseHttpEndpoint" />
      <endpoint address="https://shdcvdswa0510.apac.wdpr.disney.com/Magic.BusinessService.Host/MagicFeedbackService.svc"
        binding="basicHttpBinding" bindingConfiguration="MagicFeedbackHttpEndpoint"
        contract="MagicFeedbackService.MagicFeedbackServiceContract"
        name="MagicFeedbackHttpEndpoint" />
      <endpoint address="https://keystone-ems-dev.disney.pvt/AuthorizationService/ws.asmx"
        binding="basicHttpBinding" bindingConfiguration="wsSoap" contract="KeystoneAuth.wsSoap"
        name="wsSoap" />
      <endpoint address="https://shdcvdswa0510.apac.wdpr.disney.com/Magic.BusinessService.Host/MagicContactService.svc"
        binding="basicHttpBinding" bindingConfiguration="MagicContactHttpEndpoint"
        contract="MagicContactService.MagicContactServiceContract" name="MagicContactHttpEndpoint" />
    </client>
  </system.serviceModel>

'''

Any help would be greatly appreciated.
Posted

1 solution

1.The problem is related with your WCF service and its configuration. To enable HTTPS in your WCF service you should use Security transport protocol (you did only partially), then you should generate and use SSL certificates.

2.In the next article there are described the steps for enabling HTTPS for a WCF:
Seven simple steps to enable HTTPS on WCF WsHttp bindings[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900