Authentication 使用asgXmpp连接到我的openfire服务器故障
我创建了一个C网站来测试连接是否正常工作。这是我的代码,请帮助:Authentication 使用asgXmpp连接到我的openfire服务器故障,authentication,connection,openfire,agsxmpp,Authentication,Connection,Openfire,Agsxmpp,我创建了一个C网站来测试连接是否正常工作。这是我的代码,请帮助: protected void Unnamed1_Click(object sender, EventArgs e) { XmppClientConnection xmpp; xmpp = (XmppClientConnection)Application["xmpp"]; if (xmpp == null) { xmpp = new XmppClientConnection();
protected void Unnamed1_Click(object sender, EventArgs e)
{
XmppClientConnection xmpp;
xmpp = (XmppClientConnection)Application["xmpp"];
if (xmpp == null)
{
xmpp = new XmppClientConnection();
Application["xmpp"] = xmpp;
}
xmpp.OnLogin += new ObjectHandler(xmpp_OnLogin);
Jid jid = new Jid("ttt@192.168.1.131");
xmpp.AutoPresence = true;
xmpp.AutoResolveConnectServer = true;
xmpp.Port = 5222;
xmpp.UseSSL = false;
xmpp.Server = jid.Server;
xmpp.Username = "test@jh";
xmpp.Password = "123456";
xmpp.ClientVersion = "1.0";
xmpp.SendMyPresence();
xmpp.Open();
}
void xmpp_OnLogin(object sender)
{
Console.WriteLine();
}
我尝试了很多次,但仍然不起作用。您应该更改xmpp.AutoResolveConnectServer=false。我希望,我能帮助你