Author |
Topic  |
|
Steve Pick
Starting Member
Denmark
3 Posts |
Posted - 11 February 2002 : 18:16:37
|
I have included the Snitz Forum in a already established memberarea, where access is controlled by a small inc in the header:
<%@ Language=VBScript %> <% Response.Expires = 0 %> <% Response.Buffer = true %> <%if not session("OK") = "OK" then Response.Clear Session("GoBack")=Request.ServerVariables("SCRIPT_NAME").Item Session("Return")=Request.ServerVariables("HTTP_REFERER") Response.Redirect("../adm/logindialog.asp") Response.End end if %>
To limit the access to the Forum, I have included the above script first in the inc_top.asp, and when poblems appeared later on only in the very beginning of the default.asp as
<!--#include file="inc_pw_lkup.asp" -->
It all works fine ( the session variable is present and is configured with the right value). The problem arise, when the user clicks om the HOME link in the upper right corner for returning to the 'main' member page. For some reason - as issuing a session.abandon - the session variable ( and the id ?) dies, and the user have to reenter the memberarea logon/pw again.
The strange part is, when the user returns again to the Forum and/or homer again no further logins are required. Only twice in the begining. What in the Forum Cookie system kills my session in the beginning.
Any guidance to where it goes wrong and how to correct it is highly appreciated.
Steve
|
|
Gremlin
General Help Moderator
    
New Zealand
7528 Posts |
Posted - 11 February 2002 : 18:21:33
|
You may need to set your cookies to Website instead of Forum, its in the Admin Options.
Word of warning though, changing this *will* force all your users to have to relogin
HALO - an EverQuest and Camelot Guild
Edited by - Gremlin on 11 February 2002 18:22:06 |
 |
|
Doug G
Support Moderator
    
USA
6493 Posts |
Posted - 11 February 2002 : 22:16:15
|
Is the forum in a different web application from your main site? If yes, maybe the server is not keeping track of the sessions between applications. Seems to me there is some info on the MS site about this (somewhere :)
Standard Disclaimer: This is only a swag
====== Doug G ====== |
 |
|
Steve Pick
Starting Member
Denmark
3 Posts |
Posted - 12 February 2002 : 03:56:09
|
I have tried to set the cookie to Website instead of Forum, but nothing helps. I just added the forum as another module of option within the member structure and it is the first 'module', which gives me the headace. I should be within the same application as I keep track of online users with the below script and it doesn't decrease. Therefore I don't think that the session itself is abandonned only the session variable and only when 'homing' for the first time from the forum to the 'memberarea'. After reentering the member login/pw everything seems normal. Something happens on the first exit from the forum
Steve
---- Global asa code to keep track of no of online users ---
Sub Session_OnStart Application.Lock Application("intBrugereOnline") = Application("intBrugereOnline") + 1 Application.Unlock End Sub
Sub Session_OnEnd Application.Lock Application("intBrugereOnline") = Application("intBrugereOnline") - 1 Application.Unlock End Sub
|
 |
|
Steve Pick
Starting Member
Denmark
3 Posts |
Posted - 28 February 2002 : 05:06:56
|
I might have found the solution to the problem. The HOME link in the header was entered as an absolute URL (http://....). Clicking this link could be interpretated by the IIS as you were changing application and forcred instantiating of a new session id.
Changing the HOME link to a relative URL seems to have solved the problem. It could be a bug in the ISS.
Morale: Use relative URLs
|
 |
|
|
Topic  |
|