Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
acdelemos #1
Member since Feb 2006 · 21 posts · Location: Brazil
Group memberships: Members
Show profile · Link to this post
Subject: Problem to connect local network.
Hi

sorry for my poor english.

I am with problem to connect miniclient in a local net.
I am using the following code.

private void cmdLogin_Click(object sender, System.EventArgs e)
{
    if (txtJid.Text.Length > 0 && txtPassword.Text.Length > 0)
    {
        Jid jid = new Jid(txtJid.Text, txtServer.Text, txtResource.Text);

        _connection.Server   = jid.Server; //192.168.0.253
        _connection.Username = jid.User;  //antonio@tecnos
        _connection.Password = txtPassword.Text;
        _connection.Resource = jid.Resource;
        _connection.Priority = (int) numPriority.Value;
        _connection.Port     = int.Parse(txtPort.Text);
        _connection.UseSSL     = chkSSL.Checked;
        _connection.UseCompression = true;
        //_connection.UseStartTLS  = false;
        _connection.RegisterAccount = chkRegister.Checked;
        this.DialogResult = DialogResult.OK;
        SaveSettings();
        this.Close();
    }
    else
    {
        MessageBox.Show("Nome de Usuário e Senha devem estar preenchidos!");
    }
}

But when I try to connect I receive the following message from error.

<failure xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><not-authorized/></failure>

As I can decide this.
Avatar
Alex #2
Member since Feb 2003 · 4317 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Hello,

the error is an authentication error (wrong username or password).
Did you setup your local server correct? Keep in mind that the Server property is important when you use SASL authentication. If you configured the server with a domainname and enter a IP-Address for server you will get errors.
Posting your whole XML-Debug could also help us finding the error.

Alex
Avatar
acdelemos #3
Member since Feb 2006 · 21 posts · Location: Brazil
Group memberships: Members
Show profile · Link to this post
thanks Alex.

I include this line
_connection.ConnectServer = txtServer.Text;
and work fine.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: agsXMPP RSS