Subject: Unable to catch exception when Openfire server is down
Hi,
I am using openfire as xmpp server and I am trying to connect to openfire using agsxmpp bosh. If the openfire server is up and running, the connection is getting established and working perfectly fine.
However when the openfire server is down during the connection, it throws an error Webexception was unhandled. I couldn't able to catch the Webexception either by using Exception Hanlder(try catch block) or by adding the event to OnError.
Below is my code sinippet
Please let me know whether I am missing anything or do I need to implement in different.
Thanking in Advance
Sheshagiri
I am using openfire as xmpp server and I am trying to connect to openfire using agsxmpp bosh. If the openfire server is up and running, the connection is getting established and working perfectly fine.
However when the openfire server is down during the connection, it throws an error Webexception was unhandled. I couldn't able to catch the Webexception either by using Exception Hanlder(try catch block) or by adding the event to OnError.
Below is my code sinippet
- xmpp.Server = "xmppDomainName specified in the openfire";
- xmpp.Port = port;
- xmpp.Username = user;
- xmpp.Password = pass;
- xmpp.Resource = ReadSetting("fromUserResource");
- xmpp.ConnectServer = "http://openfireserver:7071/http-bind/";
- xmpp.AutoResolveConnectServer = false;
- xmpp.OnAuthError += xmpp_OnLoginFailure;
- xmpp.OnError += xmpp_OnError;
- xmpp.Open();
Please let me know whether I am missing anything or do I need to implement in different.
Thanking in Advance
Sheshagiri
This post was edited 3 times, last on 2017-08-01, 12:42 by Alex.