Genesys CTI User Forum
Genesys CTI User Forum => Genesys CTI Technical Discussion => Topic started by: Alyw on June 21, 2015, 07:10:33 AM
-
Hi, I'm new in developing windows application (using C#.NET) with genesys products. I was able to connect to config server and t-server, but the problem is how can I catch the login error when user enter wrong login details and prompt a message with the stated error? Here's my code:
confServerProtocol = new ConfServerProtocol(new Endpoint(new Uri("tcp://" + Host + ":" + Port)));
confServerProtocol.UserName = UserName;
confServerProtocol.UserPassword = Password;
confServerProtocol.ClientName = Application;
confServerProtocol.ClientApplicationType = (int)CfgAppType.CFGAgentDesktop;
try
{
confServerProtocol.Open();
}
catch (ProtocolException ex)
{
//Catch and display error
}
Is it correct to use ProtocolException to catch the error? How can I related it with CfgErrorType? I've gone through the developer guide but I still have no idea how to implement.
-
Are you using sync or async access to the confserv? In sync, on your request login you should receive Event(ACK/Error/etc.), from which you can find out the result.
-
Hi Kubig, thanks for the response. May I know how can I use sync operation in this case? Based on what I've done, I can only catch the error under ProtocolException. For example, if the connection uri is incorrect, it will return: [psdkendpoint@testing:2020@testing:2020] Error opening connection. By the way, the error is displayed in console output.