07-25-2016 08:42 PM - edited 07-25-2016 08:45 PM
I have a vb.net program using the SAS.Eg.Scripting library. When I attempt to multi-thread 2 instances of the Application object, the sub with the first instance runs fine however on the second instance, I get the following error:
SAS.Eg.Scripting.ScriptingException: Unable to connect to server: server:port at SAS.Eg.Scripting.Application.InitializeEngine() at SAS.Eg.Scripting.Application.InitializeBroker() at SAS.Eg.Scripting.Application..ctor(String_cmdLineProvider)
I'm running SAS EG 5.1 and the code I'm using is along the lines of:
Imports SAS.EG.Scripting Class Example
Dim taskList = New List(Of Task)
Sub RunCode(fileName as String) Dim egApp = New Application() Dim egProj As ISASEGProject egApp.RunAutoexecFlow = True egProj = egApp.Open(fileName as String, "") 'opens an .egp file that uses AUTOEXEC to run and export code egProj.Close egApp.Quit() End Sub End Class
Can anyone offer any suggestions as to why I'm getting the error on the second object?