Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Logged in user sent back to login.asp

Status
Not open for further replies.

CoHp

Programmer
Joined
Feb 18, 2005
Messages
3
Location
DE
I am a newcomer to asp and am trying to set up a protected sub-web in FrontPage on a Windows server using MS Access 2000 for about 900 members. For test purposes I have used scripts from here:
and I am getting the following behaviour: The user is sent to the login page (logon.asp) for validation. Once successfully logged in, the user begins to move between the various protected pages and for no discernible reason is suddenly sent back to logon.asp. There is also no logical pattern as to when this occurs or from what page. Sometimes a page shown is an older version and sometimes a newer edited version. I have tried similar code from other websites all with the same results. I´d be grateful for any help. Is this a cache problem and if so, where exactly must the "no cache" code be placed?
Thanks
Colin
 
at the beginning of each of the protected page, do you have something to check whether to person is actually login? something like...

<%
If Session("ID") = "" Then
Response.Redirect "Login.asp"
End if

%>

That Session("ID") is saved during the login process. If so, maybe that Session variable isn't 'holding' in place.
 
Or maybe the Session is timing out due to inactivity. The default for sessions is 20 minutes and if it has been more than 20 minutes since the user requested a page then their session cooke is expired.

 
I´ve got this:

<!--#INCLUDE File="passprotect.inc"-->

at the top of all protected pages, sending users to an include page which has this:

<%
IF Session("Password") = "" THEN
Session("ORI_URL") = Request.ServerVariables("Path_Info")
Response.Redirect("logon.asp")
Else
Response.Redirect("protected.asp")
End IF
%>

What do you mean by holding in place?
Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top