We have a COM+ application written in VB5. We are using the Catalyst SocketWrenchControl 2.15 Socket to interact with a Mainframe application.
The application works fine for few days then all of a sudden it's not able to connect to the mainframe application intermittently.
When we debug the code we found that the Socket.Hostaddress is coming as blank intermittently. The Socket is set using the HostName as mentioned below and the HostName entry is present in the host file.
Dim MyWinsock As SocketWrenchCtrl.Socket
' Set SocketWrench variables
MyWinsock.AddressFamily = 2
MyWinsock.Protocol = 6
MyWinsock.SocketType = 1
MyWinsock.Binary = False
MyWinsock.Blocking = False
MyWinsock.BufferSize = 4096
MyWinsock.HostName = "ABCD"
After the Socket is set as per the above code, before making a connection to the host we check for the host address; if it is blank then the application does not make a connection.
If MyWinsock.HostAddress = "" Then <----- Line where the code fails
--Throw Error Message
As I mentioned earlier the application works perfectly fine for some days and then intermittently it's not able find the Host Address. So we have to restart the application again.
Could you please give some suggestions around what could be the reason for the same?
We have already checked with Catalyst Support team, if it could be anything with the Socket but as per them it does not seems to be an issue with the Socket.
The application works fine for few days then all of a sudden it's not able to connect to the mainframe application intermittently.
When we debug the code we found that the Socket.Hostaddress is coming as blank intermittently. The Socket is set using the HostName as mentioned below and the HostName entry is present in the host file.
Dim MyWinsock As SocketWrenchCtrl.Socket
' Set SocketWrench variables
MyWinsock.AddressFamily = 2
MyWinsock.Protocol = 6
MyWinsock.SocketType = 1
MyWinsock.Binary = False
MyWinsock.Blocking = False
MyWinsock.BufferSize = 4096
MyWinsock.HostName = "ABCD"
After the Socket is set as per the above code, before making a connection to the host we check for the host address; if it is blank then the application does not make a connection.
If MyWinsock.HostAddress = "" Then <----- Line where the code fails
--Throw Error Message
As I mentioned earlier the application works perfectly fine for some days and then intermittently it's not able find the Host Address. So we have to restart the application again.
Could you please give some suggestions around what could be the reason for the same?
We have already checked with Catalyst Support team, if it could be anything with the Socket but as per them it does not seems to be an issue with the Socket.