avatar image
Former Member

Use .Net for Tls1.2

Good Morning, We need to consume a webservice soap that uses the TLS 1.2 protocol. We are using version 12.6 of PowerBuilder, we created the proxy based WSDL. Attempting to consume this service returns the message "Underlying connection was closed". We believe that the problem is with the version of the protocol, we made several attempts to use versions of .Net but without success. We need help.

Att; Ronaldo Alberton

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Jul 06, 2017 at 06:05 AM

    We had the same problem and I have not found a solution with standard powerbuilder. But we have a workaround.

    To use TLS 1.2 you need .NET framework version >= 4.5.

    Our solution:

    - Build C# classes from WSLD (e.g. using WSEWSDL3.EXE)

    - Maybe it is already running with this classes. If you want to specify the protocol write your own extension for the service class of the build classes and override the method GetWebRequest. There you can set the SecurityProtocol.

    protected override WebRequest GetWebRequest(Uri uri)
    HttpWebRequest req = (HttpWebRequest)base.GetWebRequest(uri);
    System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12;
    return (WebRequest)req;

    - Compile the classes with correct .NET framework (CSC.EXE)

    - You can use the assemblies in Powerbuilder as COM. For more information search the web. There are good examples by Bruce Armstrong.

    Add comment
    10|10000 characters needed characters exceeded

Skip to Content