Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
silay #1
Member since Jul 2010 · 12 posts
Group memberships: Members
Show profile · Link to this post
Subject: Multiple Session - ASP.NEt Continuation...
Hi Alex,

This is the code. Please guide me , how to make the resource as Unique? I am a starter in asp.net

I have attached the code as Text file.


Thanks in advance.

Ilay
The author has attached one file to this post:
code file as text file.txt 19.1 kBytes
You have no permission to open this file.
Avatar
Alex #2
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
try to set the Resource property before you connect.
  1. xmppCon.Resource = System.Guid.NewGuid().ToString();

or set it to null then the server should assign a unique resource to you.
  1. xmppCon.Resource = null;
Avatar
silay #3
Member since Jul 2010 · 12 posts
Group memberships: Members
Show profile · Link to this post
Thanks Alex.

Will try and get back to you soon.

Cheers,
Ilay
Avatar
silay #4
Member since Jul 2010 · 12 posts
Group memberships: Members
Show profile · Link to this post
Alex,

I have updated the code as given below in myLogin().


[System.Web.Services.WebMethod]
    public static void myLogin(string strUserName, string strPassword)
    {
        XmppClientConnection xmpp = (XmppClientConnection)HttpRuntime.Cache["xmpp"];
        InitializeService(strUserName, strPassword);
        xmpp.AutoPresence = true;
        xmpp.AutoRoster = true;
        xmpp.AutoResolveConnectServer = true;
        xmpp.Port = 5222;
        xmpp.UseSSL = false;
        xmpp.Server = "gmail.com";
        xmpp.ConnectServer = "talk.google.com";
        xmpp.Username = strUserName;
        xmpp.Password = strPassword;
        xmpp.Resource = null;
        xmpp.Status = "hello from " + strUserName + " i am ready fro chat";
        xmpp.Open();
    }


But still I get kicked out. Do I need to use the Session cache method to identify the session objects and do it?

Regards,
Ilay
Avatar
Alex #5
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
I assume that the problem is in your app, or the app is crashing.
When you post your complete xml log i can tell you if the session was kicked or not.

Alex
Avatar
silay #6
Member since Jul 2010 · 12 posts
Group memberships: Members
Show profile · Link to this post
Hi Alex,

Yes there was a problem in my web App.

I have modified the code the use the HTTPRunTime.Cache in Session level  and it worked.

I appreciate your guidance. I will buzz you on more doubts.

cheers,
Ilay
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