Question
· Apr 18, 2023

Error when changing legacy VB.Net code from InterSystems.Data.CacheClient to InterSystems.Data.IRISClient

I have updated some legacy VB/ASP.NET code and changed the references of InterSystems.Data.CacheClient to InterSystems.Data.IRISClient.  I am struggling with the code as I am not a .NET expert and there is little or no documentation.

I have published the code on several test IIS sites and on some the code works fine but on others I get the below error.   The error doesn't appear to be O/S specific as I have it working on some Windows 2016 servers and not working on other Windows 2016 servers.  I have checked the network card settings as the error seems to refer to IPv6 and IPv6 is not enabled on any of the servers.

None of the discovered or specified addresses match the socket address family.
Parameter name: context

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ArgumentException: None of the discovered or specified addresses match the socket address family.
Parameter name: context Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[ArgumentException: None of the discovered or specified addresses match the socket address family.
Parameter name: context]
   System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult) +2500829
   System.Net.Sockets.TcpClient.EndConnect(IAsyncResult asyncResult) +68
   InterSystems.Data.IRISClient.TCPDevice.Connect(String Address, Int32 Port, Int32 timeoutMSec, Boolean ipv6) +559
   InterSystems.Data.IRISClient.TCPDevice.Connect(String Address, Int32 Port, Int32 timeoutMSec) +142
   InterSystems.Data.IRISClient.TCPDevice..ctor(IPEndPoint ipEndPoint, IRISADOConnection conn) +438
   InterSystems.Data.IRISClient.IRISPool.CreateNewPooledConnection(IRISADOConnection conn) +159
   InterSystems.Data.IRISClient.IRISPool.GetPooledConnection(IRISADOConnection conn) +198
   InterSystems.Data.IRISClient.IRISPoolManager.GetConnection(IRISADOConnection conn) +579
   InterSystems.Data.IRISClient.IRISADOConnection.OpenInternal() +89
   InterSystems.Data.IRISClient.IRISADOConnection.Open() +95

[IRISException (0x80004005): [IRIS Provider] Communication link failure: System.ArgumentException; None of the discovered or specified addresses match the socket address family.
Parameter name: context]
   InterSystems.Data.IRISClient.IRISADOConnection.Open() +702
   ManagedCache.ExecuteReader(String QueryText) +64
   _Default.Page_Load(Object sender, EventArgs e) +62
   System.Web.UI.Control.OnLoad(EventArgs e) +132
   System.Web.UI.Control.LoadRecursive() +66
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428
Product version: IRIS 2022.1
$ZV: IRIS for Windows (x86-64) 2022.1.2 (Build 574) Fri Jan 13 2023 15:13:17 EST
Discussion (0)1
Log in or sign up to continue