Need to redirect web service clients that use services with endpoints on HTTP to HTTPS or redirect them somewhere else.RSS

3 replies

Last post Mar 26, 2020 08:59 PM by lextm

  • Need to redirect web service clients that use services with endpoints on HTTP to HTTPS or redirec...

    Mar 17, 2020 01:47 PM|CharleyCook1967|LINK

    We recently updated our server (Windows Server 2012, R2. IIS 8.5) to force all traffic to HTTPS. We have several hundred customers that use our products, which consume web services that have end points on HTTP addresses. We have no ability to touch the vast majority of these customers. We expected that we would have trouble with this and we were not disappointed. During a test run we did indeed break some of those clients. The need to redirect HTTP traffic to HTTPS is a common need or requirement and the solution is well documented (URL Rewrite). I have to believe that our situation with web service clients over HTTP is also fairly common but I haven't been able to find a solution online. I would imagine we can solve it using the same tool we used to redirect HTTP to HTTPS but I have been unable to find information to help us with it. Our company is small. I'm a software engineer but I also have some experience in Network IT so in addition to my development responsibilities I get to maintain our servers. But I am far from an expert and this URL Rewrite module is as complicated a utility as I have ever come across. Any help with this problem would be appreciated. 

  • Rovastar Rovastar

    5445 Posts

    MVP

    Moderator

    Re: Need to redirect web service clients that use services with endpoints on HTTP to HTTPS or red...

    Mar 17, 2020 04:41 PM|Rovastar|LINK

    So let me understand correctly.

    You currently have recently implemented a URLrewrite rule that redirects HTTP traffic to HTTPS. And that is working ok in general for normal browsers but not for certain clients?

    ( I will presume the initial rule for URLrewrite should be straight forward. e.g. https://ruslany.net/2009/04/10-url-rewriting-tips-and-tricks/#redirect-https

    )

    If you have that I expect most browsers client to understand.

    So what is happening with these other clients? Are all the clients the same or many different ones? Are some working or all of them broken?

    Can they even transmit over HTTPS? Have they got the correct TLS version or ciphers at each end?

    Troubleshoot IIS in style
    https://www.leansentry.com/
  • Re: Need to redirect web service clients that use services with endpoints on HTTP to HTTPS or red...

    Mar 26, 2020 03:51 PM|CharleyCook1967|LINK

    The rule for redirecting HTTP to HTTPS works fine. It's the clients consuming our Web Services that are not working correctly. These web services are .Net based SOAP web services. When one of these clients tries to use these web services, they get the following error:

    System.Net.WebException(0x80131509): The request failed with the error message:
    --
    <head><title>Document Moved</title></head>
    <body><h1>Object Moved</h1>This document may be found <a HREF="https://www.SomeOtherWebsite.com/SomeOtherWS/clsSomeOtherFile.asmx">here</a></body>
    --.
    at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)

  • Re: Need to redirect web service clients that use services with endpoints on HTTP to HTTPS or red...

    Mar 26, 2020 08:59 PM|lextm|LINK

    Old technologies (asmx or WCF) might not work well with such redirection. You might instead configure ARR reverse proxy, https://stackoverflow.com/questions/45937254/iis-redirect-rewrite-asmx-service

    Lex Li
    https://lextudio.com
    ---------------------------
    This posting is provided "AS IS" with no warranties, and confers no rights.