tags:

views:

47

answers:

3

We have extended a legacy app, however the existing login and user management mechanism doesnt seem to work with the new module.

Our module keeps causing the user to be logged out, when they navigate back to the existing application.

We've removed all pages which might force the session to be expired. We have no code related to user sessions and logins We have no code that logs out the user.

A: 

Could use Database or Memcache perhaps but both are going to be messy if you can't use SessionID or similar as a key I suppose.

Don
if i use a database , how would i know which user is logged in
A: 

You are not telling by wich mechanism the server should know which user is logged on ? What are you currently using: javascript, asp pages ?

If you should be using cookies, please make sure that the domain name you use in your cookie writing and cookie writing code (especially when you are mixing javascript and asp code) is written the same (so case sensitive). If not your code might be reading another value than the one written.

I know I have been searching for a problem a long time before I found out that I wrote the cookie to domain Edelcom.be and was reading if from edelcom.be.

Edelcom
ill check the case of the domain name
we use cookies to record the login. If the cookie is empty or doesnt exist then the user isnt logged in. Returing the browser to the login page.When they login we write their logins to the cookie.
Can you show the code your are using to read and to write cookies ? Are you adding a time-stamp to make sure they exist long enough ?
Edelcom
A: 

You should be able to use Cookies as this doesn't depend on sessions staying alive. Cookies can persist as long as you want them to - you just need to set the "expires" value.

It sounds like you are actually wanting to get rid of session variables for logins but this should not mean you have to also ditch cookies.

mike nelson
well we dont know why the user keeps getting logged out. We use cookies presently.The new component keeps killing the cookies, forcing the user log out.