0

Hello & thanks for looking.

I have an application where the front end calls a web service from the angular front end. Recently I added https bindings to IIS for compliance reasons.

The previous version worked because it contained only a http binding in the web config. The F5 would receive the http request for the service, change it to https then send it along to port 80 which worked because there was the http endpoint in the web.config.

The attempted version worked in test because there is no F5 involved, everything just got sent to the https binding and everything was fine. Now with two bindings in the mix when the web service is called I get a 404 not found because I think there is something wrong now with my http endpoint. If I could trouble you please look at the before & after and see what I am doing wrong. The servers are Windows Server 2016

Original version that works with only http endpoint which F5 turns to https and sends -> port 80

<system.serviceModel>
<behaviors>
  <endpointBehaviors>
    <behavior name="trakWebclientServices.WebclientServiceAspNetAjaxBehavior">
      <enableWebScript />
    </behavior>
  </endpointBehaviors>
</behaviors>
<bindings>
  <webHttpBinding>
    <binding maxReceivedMessageSize="2147483647">
      <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
      <security mode="TransportCredentialOnly">
        <transport clientCredentialType="Windows" />
      </security>
    </binding>
  </webHttpBinding>
</bindings>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
<services>
  <service name="trakWebclientServices.WebclientService">
    <endpoint address="" behaviorConfiguration="trakWebclientServices.WebclientServiceAspNetAjaxBehavior" binding="webHttpBinding" contract="trakWebclientServices.WebclientService" />
  </service>
</services>

</system.serviceModel>

Here is the attempted version that fails with both http and https bindings with 404 not found when used with F5 but works in test environment that does not include F5.

<system.serviceModel>
<behaviors>
  <endpointBehaviors>
    <behavior name="trakWebclientServices.WebclientServiceAspNetAjaxBehavior">
      <enableWebScript />
    </behavior>
  </endpointBehaviors>
</behaviors>
<bindings>
  <webHttpBinding>
    <binding maxReceivedMessageSize="2147483647">
      <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
      <security mode="None">
      </security>
    </binding>
  <binding name="pt_httpsBinding" maxReceivedMessageSize="2147483647">
    <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647"/>
    <security mode="Transport">
      <transport clientCredentialType="None"/>
    </security>
  </binding>
  </webHttpBinding>
</bindings>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
<services>
  <service name="trakWebclientServices.WebclientService">
    <endpoint address="" behaviorConfiguration="trakWebclientServices.WebclientServiceAspNetAjaxBehavior" binding="webHttpBinding" contract="trakWebclientServices.WebclientService" />
  </service>
</services>

</system.serviceModel>

Again thanks for looking.

drzounds
  • 369
  • 3
  • 16
  • A 404 error should be a problem with your URL, I suggest you enable the help document to view the correct URL: https://stackoverflow.com/questions/64412182/test-wcf-service-using-postman/64420180#64420180 – Ding Peng Mar 31 '21 at 01:36
  • I'll try that. My url has not changed in IIS I just added an https binding. – drzounds Mar 31 '21 at 15:09

0 Answers0