Please post a the complete xml debug of your registration.
And be aware that the @ in usernames is invalid and must escaped, see XEP-0106: JID Escaping.
here is it:
SEND: <iq id="agsXMPP_1" type="get" to="127.0.0.1"><query xmlns="jabber:iq:register" /></iq>
RECV: <iq xmlns="jabber:client" from="127.0.0.1" type="result" id="agsXMPP_1"><query xmlns="jabber:iq:register"><username /><password /><email /><name /><x xmlns="jabber:x:data" type="form"><title>XMPP Client Registration</title><instructions>Please provide the following information</instructions><field type="hidden" var="FORM_TYPE"><value>jabber:iq:register</value></field><field type="text-single" label="Username" var="username"><required /></field><field type="text-single" label="Full name" var="name" /><field type="text-single" label="Email" var="email" /><field type="text-private" label="Password" var="password"><required /></field></x></query></iq>
SEND: <iq type="set" id="agsXMPP_2" to="127.0.0.1"><query xmlns="jabber:iq:register"><username>aa\40a</username><password>12345</password></query></iq>
RECV: <iq xmlns="jabber:client" from="127.0.0.1" to="127.0.0.1/de3427c" type="result" id="agsXMPP_2" />
SEND: <auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="DIGEST-MD5" />
RECV: <challenge xmlns="urn:ietf:params:xml:ns:xmpp-sasl">cmVhbG09IjEyNy4wLjAuMSIsbm9uY2U9IjBPby9iYnlIQVdDSGtzUXhTZEdKNEo0ZzFYMzBTZDgwUkkxMExzdC8iLHFvcD0iYXV0aCIsY2hhcnNldD11dGYtOCxhbGdvcml0aG09bWQ1LXNlc3M=</challenge>
SEND: <response xmlns="urn:ietf:params:xml:ns:xmpp-sasl">dXNlcm5hbWU9ImFhXDQwYSIscmVhbG09IjEyNy4wLjAuMSIsbm9uY2U9IjBPby9iYnlIQVdDSGtzUXhTZEdKNEo0ZzFYMzBTZDgwUkkxMExzdC8iLGNub25jZT0iMDU5NjhlNGI4ODg2MzI2NzNkOGEyY2IwNjM5YjdmMDNjY2ZiYjRjZGVlZTllMmEzNWUzY2E0MzM1ODM4NTUxMiIsbmM9MDAwMDAwMDEscW9wPWF1dGgsZGlnZXN0LXVyaT0ieG1wcC8xMjcuMC4wLjEiLGNoYXJzZXQ9dXRmLTgscmVzcG9uc2U9YTUxZmVlZDBkZGY1YmFjMDU1ZjIwMzE4ODFkZmUzYjc=</response>
RECV: <failure xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><not-authorized /></failure> I have red the XEP-0106: JID Escaping.it show me that when I use @ in the username,I must transfer it into \40.But I did it and it did not work.
_connection.Server = "127.0.0.1";
string userName = txtJid.Text;
userName = userName.Replace("@","\\40");
_connection.Username = userName;
_connection.Password = txtPassword.Text;
Do you think i need to modify the agsxmpp source code ? or could you tell me how to modify it?