Re: [twsocket] Problem with Webserver Session
> is there example code where I can see the Session handling via URL > and SessionID? The only sample code using web sessions is the web application server, OverbyteIcsWebAppServer.dpr Angus -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] Problem with Webserver Session
Hi Angus, is there example code where I can see the Session handling via URL and SessionID? 2014-10-01 15:49 GMT+02:00 Angus Robertson - Magenta Systems Ltd < an...@magsys.co.uk>: > > I think there is something wrong with setting/recognizing the > > session cookie because every time I execute the function above a new > > session will be generated. I got another ICS web server app running > > and there a cookie is set correctly. In this app the cookie is not > > set and I don't know why: > > I don't have logging in my web application at that point, so don't know if > it > works correctly, just know the application itself does what I expect. > > Never looked at the web session code, you'll need try debug it to see where > things go wrong, although checking where the cookie gets lost is much > quicker. > > Angus > > > -- > To unsubscribe or change your settings for TWSocket mailing list > please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket > Visit our website at http://www.overbyte.be > -- Stefan Göppert Softwareentwicklung Höltene Klinke 89 48653 Coesfeld / Deutschland tel.: +49 / 02541 / 8475530 mail: ste...@magicdesignssoftware.de web: http://www.magicdesignssoftware.de facebook: https://www.facebook.com/magicdesignssoftware google+: https://www.google.com/+MagicdesignssoftwareDe twitter: https://twitter.com/StefanGoeppert -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] Problem with Webserver Session
> I think there is something wrong with setting/recognizing the > session cookie because every time I execute the function above a new > session will be generated. I got another ICS web server app running > and there a cookie is set correctly. In this app the cookie is not > set and I don't know why: I don't have logging in my web application at that point, so don't know if it works correctly, just know the application itself does what I expect. Never looked at the web session code, you'll need try debug it to see where things go wrong, although checking where the cookie gets lost is much quicker. Angus -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] Problem with Webserver Session
Hi Angus, I think there is something wrong with setting/recognizing the session cookie because every time I execute the function above a new session will be generated. I got another ICS web server app running and there a cookie is set correctly. In this app the cookie is not set and I don't know why: procedure TUrlHandlerIndex.Execute; var Headers : String; session : TMDTSession; begin if not ValidateSession then begin Inc(sessionCount); session := TMDTSession.Create(nil); session.Name := 'mdtime' + IntToStr(sessionCount); Headers := NO_CACHE + CreateSession('',0,session); end else begin session := WSession.SessionData as TMDTSession; Headers := NO_CACHE; end; session.LoggedOn := false; AnswerPage('','', 'main.html', nil, ['DateTime', session.Name]); Finish; end; 2014-10-01 15:12 GMT+02:00 Angus Robertson - Magenta Systems Ltd < an...@magsys.co.uk>: > > I try to implement a Session to my Webserver like in the Wiki, but > > ValidateSession always returns a wrong value. The application is > > implemented as a Service. What could be wrong? > > Sessions needs cookies, are sure the server is sending a session cookie > for a > new session and the client is returning it correctly? > > I use ValidateSession (true or false), don't know what value you expect, to > create a new session or re-use an old session. But I also pass session ID > in > the URLs, so maybe it's not working. > > Angus > > -- > To unsubscribe or change your settings for TWSocket mailing list > please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket > Visit our website at http://www.overbyte.be > -- Stefan Göppert Softwareentwicklung Höltene Klinke 89 48653 Coesfeld / Deutschland tel.: +49 / 02541 / 8475530 mail: ste...@magicdesignssoftware.de web: http://www.magicdesignssoftware.de facebook: https://www.facebook.com/magicdesignssoftware google+: https://www.google.com/+MagicdesignssoftwareDe twitter: https://twitter.com/StefanGoeppert -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] Problem with Webserver Session
> I try to implement a Session to my Webserver like in the Wiki, but > ValidateSession always returns a wrong value. The application is > implemented as a Service. What could be wrong? Sessions needs cookies, are sure the server is sending a session cookie for a new session and the client is returning it correctly? I use ValidateSession (true or false), don't know what value you expect, to create a new session or re-use an old session. But I also pass session ID in the URLs, so maybe it's not working. Angus -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be