0

I create a C# website to test whether the connection is working.here is my code,please help:

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();
}

I've try lots of times,but still not working.

stealthyninja
  • 10,343
  • 11
  • 51
  • 59

1 Answers1

0

you should change xmpp.AutoResolveConnectServer = false. I hope, can help you.

ppp
  • 54
  • 7