Users getting logged out

Not sure what I am doing wrong but users aren’t staying logged in too long for some reason. I have the cookie set but I guess it shows session? Instead of date expiring. Not sure if I am doing it right, or maybe its doing it for www and not the base URL?

the site is https:// Do i need to have the cookie set as secure?

For the cookie options you also need to set the Remember Me in the login step to true. It will then store the user information in a cookie. If you don’t use the Remember Me option it will only be using a session and the user get logged out when the browser closes or the server session expires (depends on your web server, normally around 20 minutes of inactivity).

@patrick I have the remember me variable set to 1, isn’t that correct. I just set it in the login properties is this not correct?

or does it need to be set to ‘true’

I’m still using asp classic so maybe something is amiss?

I’ve tried 1 and true. Both set to session.

Any value should have worked, to pass an actual boolean you need to use {{true}}.

ok, @patrick I’ve officially tried 1, true and {{true}} and it still will not write a cookie for security? What else can I try or other thing to troubleshoot? This logging my users out is killing me. here is my login and cookie info:

could it be because the security login is in a condition? Could I have a library file that is old for some reason?

Hey Baub,

I would start with modifying your Domain property. Here is some info that will help you choose what to set:

Domain attribute

The Domain attribute specifies which hosts are allowed to receive the cookie. If unspecified, it defaults to the same origin that set the cookie, excluding subdomains . If Domain is specified, then subdomains are always included. Therefore, specifying Domain is less restrictive than omitting it. However, it can be helpful when subdomains need to share information about a user.

For example, if Domain=mozilla.org is set, then cookies are available on subdomains like developer.mozilla.org .

1 Like

It looks like the domain doesn’t match the cookie:


The domain is www.hitekfab
and the cookie is testing.hitekfab

If you are testing on the testing. domain, change the cookie settings to match

1 Like

@baub if you want to use subdomains, then you can just enter hitekfab.com in the Domain field, or just leave it empty.

1 Like

alternatively set hitekfab.com as teh domain to allow all sub domains

:rofl: @Teodor, you beat me to it…

1 Like

ok, tried that same thing. only session variable


It has to be something with the asp classic implementation?

Is there some code I can post. or what portion of the dmx library deals with this?

And should the remember me variable be set to 1, true or {{true}} if I don’t post variable and just set it to always remember the login?

1 will be just fine.

I’ve literally tried everything. Still won’t write the cookie. Could there be a server setting or something that would block the use of cookies? IIS?

@teodor can i private message you the login creds and you can try and look to see whats going on. this is killing me it should be so easy. I don’t know what I"m missing

Is there any error or warning in the dev console?

Check in the devtools the in the Network tab the Response Headers of the request. It should contain a set-cookie header.

image

@patrick was able to help me out. He just tried it and it worked lol. Problem was that when I hit save on my security action script it wasn’t updating the security provider file thats in dmxconnect/modules/security providers to the live site. I manually copied it over there and then it started working after that.