I follow the instruction of Platform connect but the connection never open (I debug the opened event).
private void test()
{
Genesyslab.Platform.Commons.Connection.Configuration.PropertyConfiguration tserverConfig = new Genesyslab.Platform.Commons.Connection.Configuration.PropertyConfiguration();
tserverConfig.UseAddp = true;
tserverConfig.AddpClientTimeout = 10;
tserverConfig.AddpServerTimeout = 10;
tserverConfig.AddpTraceMode = Genesyslab.Platform.Commons.Connection.Configuration.AddpTraceMode.Both;
tserverConfig.LocalBindingPort = 2020;
tserverConfig.LocalBindingHost = "192.168.56.101";
//tserverConfig.SetOption(Genesyslab.Platform.Commons.Connection.AddpInterceptor.ActiveKey, Genesyslab.Platform.Commons.Connection.AddpInterceptor.Name);
tserverConfig.SetOption(Genesyslab.Platform.Commons.Connection.AddpInterceptor.TimeoutKey, "10");
tserverConfig.SetOption(Genesyslab.Platform.Commons.Connection.AddpInterceptor.RemoteTimeoutKey, "11.5");
tserverConfig.SetOption(Genesyslab.Platform.Commons.Connection.AddpInterceptor.TraceKey, "full");
Genesyslab.Platform.Commons.Protocols.Endpoint tserverEndpoint = new Genesyslab.Platform.Commons.Protocols.Endpoint("T-Server", "192.168.56.101", 2020, tserverConfig);
Genesyslab.Platform.Voice.Protocols.TServerProtocol tserverProtocol = new Genesyslab.Platform.Voice.Protocols.TServerProtocol(tserverEndpoint);
tserverProtocol.ClientName = "admin";
tserverProtocol.ClientPassword = "1234";
tserverProtocol.Opened += new EventHandler(tserverProtocol_Opened);
tserverProtocol.BeginOpen();
Genesyslab.Platform.ApplicationBlocks.ConfigurationObjectModel.IConfService IConfService =
Genesyslab.Platform.ApplicationBlocks.ConfigurationObjectModel.ConfServiceFactory.CreateConfService(
tserverProtocol);
Genesyslab.Platform.ApplicationBlocks.ConfigurationObjectModel.Queries.CfgActionCodeQuery CfgActionCodeQuery =
new Genesyslab.Platform.ApplicationBlocks.ConfigurationObjectModel.Queries.CfgActionCodeQuery(IConfService);
//CfgActionCodeQuery.
CfgActionCodeQuery.Filter.OfType<Genesyslab.Platform.Configuration.Protocols.Types.CfgCallActionCode>();
CfgActionCodeQuery.Name = "KSippola";
ICollection<Genesyslab.Platform.ApplicationBlocks.ConfigurationObjectModel.CfgObjects.CfgActionCode> CfgActionCode =
CfgActionCodeQuery.Execute();
tserverProtocol.Close();
}
void tserverProtocol_Opened(object sender, EventArgs e)
{
//throw new NotImplementedException();
}
...
Genesyslab.Platform.ApplicationBlocks.ConfigurationObjectModel.ConfigException was unhandled
Message="Exception on sending request"
Source="Genesyslab.Platform.ApplicationBlocks.ConfigurationObjectModel"
StackTrace:
at Genesyslab.Platform.ApplicationBlocks.ConfigurationObjectModel.GlobalConfService.BeginLoadObject(IProtocol protocol, ICfgQuery query, ConfService confService, AsyncCallback finishCallback, AsyncCallback dataCallback, Int64 timeout, Object state, Boolean isBriefInfo)
at Genesyslab.Platform.ApplicationBlocks.ConfigurationObjectModel.CfgObjectFactory.BeginRetrieveMultipleObjects(ICfgQuery query, ConfService confService, AsyncCallback finishCallback, AsyncCallback dataCallback, Int64 timeout, Object state, Boolean isBriefInfo)
at Genesyslab.Platform.ApplicationBlocks.ConfigurationObjectModel.ConfService.BeginRetrieveMultipleObjects(ICfgQuery query, AsyncCallback finishCallback, AsyncCallback dataCallback, Object state, Int64 timeout, Boolean isBriefInfo)
at Genesyslab.Platform.ApplicationBlocks.ConfigurationObjectModel.ConfService.RetrieveMultipleObjects[T](ICfgQuery query, AsyncCallback finishCallback, AsyncCallback dataCallback, Int64 timeout)
at Genesyslab.Platform.ApplicationBlocks.ConfigurationObjectModel.ConfService.RetrieveMultipleObjects[T](ICfgQuery query)
at Genesyslab.Platform.ApplicationBlocks.ConfigurationObjectModel.Queries.CfgQuery.Genesyslab.Platform.ApplicationBlocks.ConfigurationObjectModel.Queries.ICfgQuery.Execute[T]()
at Genesyslab.Platform.ApplicationBlocks.ConfigurationObjectModel.Queries.CfgActionCodeQuery.Execute()
at COMAPI3.Form1.test() in C:\Users\Administrator\AppData\Local\Temporary Projects\COMAPI3\Form1.cs:line 51
at COMAPI3.Form1..ctor() in C:\Users\Administrator\AppData\Local\Temporary Projects\COMAPI3\Form1.cs:line 17
at COMAPI3.Program.Main() in C:\Users\Administrator\AppData\Local\Temporary Projects\COMAPI3\Program.cs:line 18
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException: Genesyslab.Platform.Commons.Protocols.ChannelClosedOnSendException
Message="Connection is not opened"
Source="Genesyslab.Platform.Commons.Protocols"
StackTrace:
at Genesyslab.Platform.Commons.Protocols.AbstractChannel.ThrowNotOpenedOnSend()
at Genesyslab.Platform.Commons.Protocols.DuplexChannel.Send(IMessage message)
at Genesyslab.Platform.ApplicationBlocks.ConfigurationObjectModel.GlobalConfService.BeginLoadObject(IProtocol protocol, ICfgQuery query, ConfService confService, AsyncCallback finishCallback, AsyncCallback dataCallback, Int64 timeout, Object state, Boolean isBriefInfo)
Environment: Win32NT [64-bit] 6.1.7601 Service Pack 1 | CLR: 2.0.50727.8800 | iso-8859-1 (1252) | CPU: [x1]
DEMOSRV [DEMOSRV\Administrator]: "C:\Users\Administrator\AppData\Local\Temporary Projects\COMAPI3\bin\Debug\COMAPI3.vshost.exe"
InnerException: