Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
RaymondK #1
Member since Jan 2012 · 4 posts
Group memberships: Members
Show profile · Link to this post
Subject: Problem Authenticated bool
Hello everybody,

This week I am working on a chat program with GTalk. So far people can login and receive messages, but when I try to send a message the other person don't receive anything. When I debug the bool Authenticated of the xmpp connection is false. When logging the bool is true.

Could somebody help me with this problem?> my code is included as attachment.

Thank you in advance!
The author has attached one file to this post:
code.txt 9.6 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
Are you refreshing your webpage during the session?
I think the problem is that you need to store the XmppConnection object in the session and alwas retrieve it from the session.

see also:
http://forum.ag-software.de/thread/517-onlogin-event-feuer…

Alex
Avatar
RaymondK #3
Member since Jan 2012 · 4 posts
Group memberships: Members
Show profile · Link to this post
But how can I store the XmppConnection object in the session? Do I have to do that with Session.Add(...,...)?
And what does this exactly do: xmpp = (XmppClientConnection)Application["xmpp"];
Avatar
Alex #4
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Quote by RaymondK:
And what does this exactly do: xmpp = (XmppClientConnection)Application["xmpp"];

this code stored the XmppClientConnection object in the session. The problem is when you reload the page then your page gets a complete new XMPP object. You have to store the object with the current state in the session and retrive it.

Alex
Avatar
RaymondK #5
Member since Jan 2012 · 4 posts
Group memberships: Members
Show profile · Link to this post
Quote by Alex:
Quote by RaymondK:
And what does this exactly do: xmpp = (XmppClientConnection)Application["xmpp"];

this code stored the XmppClientConnection object in the session. The problem is when you reload the page then your page gets a complete new XMPP object. You have to store the object with the current state in the session and retrive it.

Alex

When I place the code snippet xmpp = (XmppClientConnection)Application["xmpp"]; in the Login() method and run the WebApplication, the bool Authenticated is still false. The bool became false in the GoToChat() method. I don't know how to solve it. Hopefully you have a solution.
The author has attached one file to this post:
loginChat.txt 1.3 kBytes
You have no permission to open this file.
This post was edited on 2012-01-18, 11:53 by RaymondK.
Avatar
Alex #6
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Can you please attach a complete project for visual studio? Then I take a look at it.
Avatar
RaymondK #7
Member since Jan 2012 · 4 posts
Group memberships: Members
Show profile · Link to this post
The problem is solved with xmpp = (XmppClientConnection)Application["xmpp"]; First I didn't put it in the right method.

Thx! :D
Avatar
Alex #8
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
great to hear.
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