If you're not getting the IRIS Security Error every time, only when there's multiple calls, then it's possible you're exceeding your license's allowed number of concurrent connections, so I would check there first.
Also, the call to IRISPoolManager.RemoveAllIdleConnections() will remove any connections that have been closed but are still in the pool. Calling this after every Connection.Close() will undo any advantages of connection pooling. If you want to disable pooling, you can add "Pooling = False" to the connection string, then the call is unnecessary. If you want to use pooling, you should remove the call to RemoveAllIdleConnections().
Hi Enrico! Apologies for the late reply, but I wanted to add that if you are looking to use %ListOfObejcts on the IRIS side with an array on the .NET side, that's still possible. Here's a snippet of code as an example:
set addressArray = ##class(%ListOfObjects).%New()
do addressArray.Insert(home)
do addressArray.Insert(home2)
// create an array of Address on the .NET side, populated with values from addressArrayset test.AddressArray = gateway.new("Samples.InterSystems.Gateway.Address[*]", addressArray)
// get Address array from .NET, and populate %ListOfObjects with its valuesset addressArray = test.AddressArray.%getall()
for i=1:1:addressArray.Count() {
set home = addressArray.GetAt(i)
}
ObjectScript
ObjectScript
I'm working on a larger example to demo the new gateway and will be posting that soon. It's the same one that Dan Pasco mentioned in This Comment. Hope this helps!
go to post
We're currently working on getting our .NET packages posted on NuGet, @Stefan Wittmann has the latest details.
We also currently ship both .dll and .nupkg files for each of our .NET projects with IRIS, so you can use those nupkg files in the meantime.
go to post
If you're not getting the IRIS Security Error every time, only when there's multiple calls, then it's possible you're exceeding your license's allowed number of concurrent connections, so I would check there first.
Also, the call to IRISPoolManager.RemoveAllIdleConnections() will remove any connections that have been closed but are still in the pool. Calling this after every Connection.Close() will undo any advantages of connection pooling. If you want to disable pooling, you can add "Pooling = False" to the connection string, then the call is unnecessary. If you want to use pooling, you should remove the call to RemoveAllIdleConnections().
go to post
Hi Enrico! Apologies for the late reply, but I wanted to add that if you are looking to use %ListOfObejcts on the IRIS side with an array on the .NET side, that's still possible. Here's a snippet of code as an example:
set addressArray = ##class(%ListOfObjects).%New() do addressArray.Insert(home) do addressArray.Insert(home2) // create an array of Address on the .NET side, populated with values from addressArray set test.AddressArray = gateway.new("Samples.InterSystems.Gateway.Address[*]", addressArray) // get Address array from .NET, and populate %ListOfObjects with its values set addressArray = test.AddressArray.%getall() for i=1:1:addressArray.Count() { set home = addressArray.GetAt(i) }
I'm working on a larger example to demo the new gateway and will be posting that soon. It's the same one that Dan Pasco mentioned in This Comment. Hope this helps!
go to post
This was an oversight that has now been corrected. Thank you for bringing it to our attention!