Print Page | Close Window

member API - something destroying login

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=26071
Printed Date: 03 April 2026 at 9:37am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: member API - something destroying login
Posted By: mtm81
Subject: member API - something destroying login
Date Posted: 05 August 2008 at 11:01am
Hi
I'm using the member API.. both blnMemberAPIDisableAccountControl  and blnMemberAPI set tot True
 
In my main site login I set the Sessions as described.
 
When my customer is logged into my site and then clicks the link to the forum, it goes to the default.asp forum page and in the top right I can see the user is logged in.
 
If I click to go anywhere on that page (post a new topic, reply to an existing one) move around the forum) the login is destroyed and the user is no longer logged in.
 
Anyone got any ideas where I've gone wrong?
 
James



Replies:
Posted By: WebWiz-Bruce
Date Posted: 05 August 2008 at 11:03am
Could be that the cookie is not being set correctly. Do you see a long SID= number in the URL?

To change the way cookies are set edit the file in notepad called includes/setup_options_inc.asp there is an option to set the cookie to the root of the site rather than the directory.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: mtm81
Date Posted: 05 August 2008 at 11:11am
thanks for the quick reply!.
 
No I don't see anything like that in the QS.
 
One thing I have noticed which is even weirder.
 
If I turn off the API and refresh the main forum front page, I then see the quicklogin form as you would expect (implying that I am deffo not logged in)..
 
I then re-enable the API and FTP it across.. doa simple refresh and I then appear logged into the forum.. and can move around and post.
 
I then logged out... tried to log back in using the API set to to True and it's still kicking me out.
 
very very odd...


Posted By: mtm81
Date Posted: 05 August 2008 at 11:13am
I've changed that cookie path just in case and it's still the same :-(


Posted By: mtm81
Date Posted: 05 August 2008 at 11:14am
just a quick update - I actually see a long SID - is that bad?


Posted By: mtm81
Date Posted: 05 August 2008 at 11:18am
ok another update (sorry!) I've narrowed down the problem to the following:
 
It only happens if the user logs into the site, then he/she can browse and post no problem.
 
They then logout..
if they then log back in.. that's when the problem of it not logged them back into the forum occurs.
 
 


Posted By: WebWiz-Bruce
Date Posted: 05 August 2008 at 11:19am
When the existing member API is enabled then you will not see a login, registration page, or quick login as the users would login and register through your own system.

When you go to the forum after logging into your own system does it show your username at the top of the page? If not then you are not logged into the forum.

The issue may well be with the session variables being parsed to the forum. ASP session variables only work on the same web site and can not be passed across from domain to domain or even sub domains.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: mtm81
Date Posted: 05 August 2008 at 11:35am
the forum is on the same domain just under the folder /forum_new
...
 
I can post a link if it helps?


Posted By: WebWiz-Bruce
Date Posted: 05 August 2008 at 12:19pm
Quote When you go to the forum after logging into your own system does it show your username at the top of the page?


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: mtm81
Date Posted: 05 August 2008 at 12:53pm
yes, but only when first logging in from the main site.. I then go to the forum and everything is logged in and  I can post and reply etc as normal.
 
I then click logout (from the forum link) and I am logged out as it should be..
 
I then click on my main site to login (i.e log back in again) and it goes through normally on the main site, but when I click to go back into the forum.. it's not logged in...


Posted By: WebWiz-Bruce
Date Posted: 05 August 2008 at 1:11pm
This is very odd.

Maybe if you haven't already try entering your sites login and logout links into the functions/functions_existing_member_API.asp file and see if that helps.

You may also want to add into your own logout file code to destroy the session variables that you set for the forum as this may help clearout things a bit.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: mtm81
Date Posted: 05 August 2008 at 1:17pm
Hi Bruce,
ok I can't see the functions/functions_existing_member_API.asp file!!
in my functions folder there is only the functions/functions_member_API.asp
 
Am I missing one?
 
Also - my functions_member_API.asp file has the logout and login links specified.. and my logout script nulls the Sessions set ("USER")("PASSWORD") ("EMAIL")
so I know they are blank ...
 
 
 


Posted By: mtm81
Date Posted: 05 August 2008 at 4:21pm
bump..


Posted By: jamie.townsend
Date Posted: 05 August 2008 at 5:38pm
Is this happening to you or to everyone on your site ?
Can you give me a link so I can test this ?
 
I personally think this is setup incorrectly, i think you are logging in and setting the forum api sessions which then lets you browse the forums etc and then logout which deletes the sessions but not the forum cookies, then when you return to the forum after logging back in the original forum cookie remains but a new session is set.
 
I cant remeber what I did on my forum logout, I know that I called both mine and the forum logout scripts I just cant remeber in what order. Try this, try redirecting to the forum logout script when you logout using your script.


Posted By: mtm81
Date Posted: 06 August 2008 at 10:32am
Hi Jamie,
No problem.
 
The site is by another person, but I've just added some back-end CMS for him.
 
However if you go to:
http://www.learn-medical-statistics.com - www.learn-medical-statistics.com and look in the top left click to register and create a new account.
 
When that's done, that top navigation will change and you will see a link for Support Forum.. click that and you will be taken to the forum where , as you will see, you are logged in as you should be and can post etc.
 
then click the logout button.. that goes to that user_logout.asp page in the forum, which in turn then (according to the link I've set in the API) goes to MY logout script which nulls all the values in the cookies and the sessions..
 
I've got this working on several other sites I've helped out on but can't see what I've done wrong with this one?
 
Cheers for the help!


Posted By: jamie.townsend
Date Posted: 06 August 2008 at 1:19pm
Ok, so when you register it logs you and you can go to the forum.
When logged out and then attempt to login you are not logged in on forums.
 
When someone registers it sets the login session, is that the same login session set when that person logs in using the login form ?


Posted By: mtm81
Date Posted: 06 August 2008 at 2:39pm
yes..
you've got it.
if you register, or login for the first time in that browser window (i.e it's your first visit to the site during that open browser window) then you can login/register and the login to the forum works auto as well.
 
The problem comes when you then logout, and then without closing the browser window  - log back in.. that's when this problem occurs.
 
It's a senario unlikely to happen, but it is still a problem I can't get around.


Posted By: mtm81
Date Posted: 07 August 2008 at 10:20am
bump..


Posted By: WebWiz-Bruce
Date Posted: 07 August 2008 at 12:12pm
It sounds like you are not correctly destroying the session variable you need to use:-

Session.Contents.Remove("veriable_name")


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net