Account registration issues

Hello,

I am trying to set up a push-notification service using the ejabberd server and agsXMPP as my library as i am programming in C#.

However, creating an account for a user causes severe problems: When the server is restarted, one account can be created. The second attempt - with other credentials - goes wrong, no account is created.
This is not dependent on my program since it works fine again after restarting the server.

Here is my code C# and agsXMPP:

public static void CreateAccount(string Id, string Password)
        {

            Jid jidSendertemp = new Jid(Id+"@"+ServerName);
            Debug.WriteLine(jidSendertemp);

            XmppClientConnection xmppConn = new XmppClientConnection(jidSendertemp.Server);
            xmppConn.RegisterAccount = true;
            try
            {
                xmppConn.Open(jidSendertemp.User, Password);
                Debug.WriteLine("Open");
                xmppConn.OnLogin += new ObjectHandler(xmpp_OnLogin);
            }

            catch (Exception e)
            {
                Debug.WriteLine(e.Message);
                Debug.WriteLine("das war nichts");
            }
            Thread.Sleep(10000);
            xmppConn.Close();
        }

public static void xmpp_OnLogin(object sender)
        {
            Debug.WriteLine("Logged onto eJabberd. Credentials: "+JID_Sender);
        }

Here you can find my ejabberd Config-File: http://textuploader.com/5yu90

I hope you can help me, thank you in advance!

Eteokles

Syndicate content