Client status is not Bound - what is the reason?

.NET library for SMPP protocol
Locked
Vladimir
Posts: 7
Joined: Tue Jun 07, 2016 8:50 pm

Client status is not Bound - what is the reason?

Post by Vladimir » Tue Jun 07, 2016 8:53 pm

Hello!
I have exact code as in example:

Code: Select all

SmppClient client = new SmppClient();
client.Connect("smpp.server.com", 7777);
if (client.Status == ConnectionStatus.Open) 
{
    Logger.Write("Connected to SMPP server");
    client.Bind("username", "password");
    if (client.Status == ConnectionStatus.Bound) 
    { 
       Logger.Write("Bound with SMPP server");
    }
}
but for some reason, after client.Bind, client.Status is not Bound. How do I know the reason why it is not bound? Can I get error message from server or so?

Thank you.
alt
Site Admin
Posts: 985
Joined: Tue Apr 25, 2006 9:45 am

Re: Client status is not Bound - what is the reason?

Post by alt » Wed Jun 08, 2016 9:09 pm

Hello Vladimir,

You can get response status from server.
write code this way:
BindResp resp = client.Bind("username", "password");

and check resp.Status .
Locked