Error Binding Resource while Connecting to Openfire server using Jabber-Net

荒凉一梦 提交于 2019-12-06 13:33:09

Have you tried the Example or ConsoleClient application?

You're calling Connect() before your have your JabberClient instance fully configured. Set up all of your properties and callbacks first, then call Connect(). Finally, you should almost never call Login() unless AutoLogin is False or OnAuthError has fired.

Toneware

I had the exact same issue. I finally realized that I was using the wrong IP address for my network host (I was using the localhost, instead of my actual IP address). I know this isn't your exact issue, but now I can run JabberNet and connect to my local OpenFire server. Here's what I have:

Basic tab::
User: tony
Password: tony
Server: Server-Name (from the OpenFire Admin Console: / Server / Server Management page)

Network::
Port: 5222
Network Host: My IP Address

If I run the JabberNet Example app from Visual Studio 2010,

AutoLogin = true,
Resource = Jabber.Net

I just click Allow Once on the (inevitable) Invalid Certificate dialog.

Everything else is default.

I don't know if this helps at all, but it (finally) works for me.

I am also having the same error while trying to connect to Openfire. I managed to get rid of the error however by connecting with port 5223 which is Openfire's port for "The port used for clients to connect to the server using the old SSL method."

Does your server have an IPv6 address? That's not really working at the moment.

Huy

A number of parameters need to be set in order to connect using an IP address instead of DNS:

  1. NetworkHost - aka the Server IP (or hostname if you have DNS or /etc/host file configured)
  2. Server - aka XMPP Server name/domain (typically the same as the server's hostname)
jabberClient = new JabberClient();
jabberClient.NetworkHost = "192.168.0.2";
jabberClient.Server = "xmppservername.domain.etc";

If jabberClient.Server is set and jabberClient.NetworkHost is not, jabber-net will automatically assume that NetworkHost is the same as Server.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!