none
Convert a webservice to use https (offloaded) RRS feed

  • Question

  • I have a webservice in a VSTO connecting to a VB.Net webservice created in Visual Studio on the server via IIS.  Works fine over http

    I now wish to enable connection to the webservice over https. 

    SSL offloading has been set up externally to IIS on a Kemp LoadMaster virtual appliance (but this could equally well be done on Apache or a BIG-IP), and I can see the asmx & wsdl via the https url in a browser without certificate errors.

    It is NOT an option to set up SSL on IIS – It has to work with the architecture set out above/below.

    HTTPS traffic on 443 passes to the Load Balancer, which terminates SSL and forwards traffic to Apache (actually Oracle HTTP Server) on port 19000, and it is then proxied to IIS on port 80 via a .conf file referenced in the httpd.conf.

    Based on my research I believe I need to modify the client side App.config and the server side web.config to allow the webservice connection over https.

    I may also need to modify the VB.Net code as well

    However my attempts to add new endpoint bindings and behaviours have not worked so I’m hoping someone could assist by telling me what I need to add to the web.config and app.config.

     My app.config currently contains these bindings which were created via the https connection using the Add Reference option in Visual Studio

    <system.serviceModel>
    
      <bindings>
    
       <basicHttpBinding>   
    
        <binding name="MerlinXLSoap" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" />
    
       </basicHttpBinding>
    
       <customBinding>
    
        <binding name="MerlinXLSoap12">
    
         <textMessageEncoding messageVersion="Soap12" />
    
         <httpTransport />
    
        </binding>
    
       </customBinding>
    
      </bindings>
    
        <client>
    
       <endpoint address="http://server1124/merlin/wizservice/merlinxl.asmx"
    
        binding="basicHttpBinding" bindingConfiguration="MerlinXLSoap"
    
        contract="MerlinXLService.MerlinXLSoap" name="MerlinXLSoap" />
    
       <endpoint address="http://server1124/merlin/wizservice/merlinxl.asmx"
    
        binding="customBinding" bindingConfiguration="MerlinXLSoap12"
    
        contract="MerlinXLService.MerlinXLSoap" name="MerlinXLSoap12" />
    
      </client>
    
     </system.serviceModel>
    The extract from the client side VB code

    Dim ws As New MerlinXLService.MerlinXLSoapClient
    ws.Endpoint.Address = New ServiceModel.EndpointAddress(strNewUrl)
    Try
         strReturn = ws.Test_HelloWorld
    
     Catch ex As Exception
          dbg.AddException(ex, "Unable to test connection to " & strNewURL)     
      End Try
    
    Thanks

    Tuesday, December 18, 2018 4:33 PM

Answers

All replies