How to Set Access to the Licence Server Using Proxy When Web Service Cannot Download Licence Key

Description

Web service log displays this error:

2019-07-17 15:34:28,717 [9] ERROR w3wp [(null)] - Request processed with error response 'rcLicenseError'
System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 104.20.47.45:443
   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
   --- End of inner exception stack trace ---
   at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
   at System.Net.HttpWebRequest.GetRequestStream()
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   at eWay.LicenceServer.Licence.eWayLicenceService.eWayLicenceService.GetLicence(String customerCode, String username, String fingerprint, String eWayWebServiceVersion, String eWayClientVersion)
   at eWay.WebService.ServiceLogic.LicenceManager.DownloadLicenceKey(String licenceServerWebServiceAddress, String customerCode, String username, String eWayWebServiceVersion, String eWayClientVersion)
   at eWay.WebService.ServiceLogic.LicenceManager.DownloadAndSaveLicenceKey(String licenceServerWebServiceAddress, String customerCode, String username, String eWayWebServiceVersion, String eWayClientVersion)
   at eWayWSImpala.eWayWS.DownloadLicenceKey()
   at eWayWSImpala.eWayWS.DownloadLicenceKeyNow()

Version

All versions of eWay-CRM

Difficulty

High

Resolution

You need to add defaultProxy configuration to the Web.config file of web service and into eWayTimer.exe.config.

Option 1. Use Proxy PAC file (autoconfiguration script)

<defaultProxy enabled="true" useDefaultCredentials="true">
    <proxy scriptLocation="http://proxy.example.com/proxy.pac" />
</defaultProxy>

Option 2. Use Proxy address

<defaultProxy>
    <proxy usesystemdefault="True" proxyaddress="http://192.168.1.10:3128" bypassonlocal="True" />
</defaultProxy>

After you make changes to the eWayTimer.exe.config file you have to restart eWayTimer service.

Configuration file eWayTimer.exe.config is inside bin directory of the Web Service. If the configuration file eWayTimer.exe.config does not exist, you have to create it:

<?xml version="1.0"?>
<configuration>
  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
  </startup>
  <system.net>
    <defaultProxy enabled="true" useDefaultCredentials="true"/>
  </system.net>
</configuration>