|
| |
|
|
mar0364
Posts: 3221 Joined: 4/5/2002 From: Florida, US Status: offline
|
<% Session.Timeout = 45%> Question - 8/4/2005 10:43:59
This is a very simple password protection I've set up on a few Intranet pages. If I want to increase the session timout object, would I include it in the code below? I use a virtual include, to include protection on the pages I want to protect. Also does file structure matter when using the session.timeout object? Does everything need to bee in the root for it to work? Example of my structure: ROOT ROOT/COMPANY/ = contains files to be protected ROOT/SECURE/ = contains include file listed below
<%
'First we check to see if the user is logged in
IF Session("Password") = "" THEN
'If their session is empty then we create a session for the current URL they were requesting
Session("ORI_URL") = Request.ServerVariables("Path_Info")
'Then we redirect them to the login page
Response.Redirect("_logon.asp")
Else
End IF
%>
Thanks! Rich
< Message edited by mar0364 -- 8/4/2005 11:44:30 >
|
|
|
|
mar0364
Posts: 3221 Joined: 4/5/2002 From: Florida, US Status: offline
|
RE: <% Session.Timeout = 45%> Question - 8/4/2005 12:20:08
After some research. (correct me if I'm wrong here) I have two options. 1.set the session.timeout at page level for each page password protected. Example of code to put on each page: <% session.timeout =60 %> 2.set it in the properties of the virtual directory on IIS. I took option two as it required less work. Thanks! Rich
|
|
|
|
mar0364
Posts: 3221 Joined: 4/5/2002 From: Florida, US Status: offline
|
RE: <% Session.Timeout = 45%> Question - 8/4/2005 16:24:09
Thank you.
|
|
|
|
mar0364
Posts: 3221 Joined: 4/5/2002 From: Florida, US Status: offline
|
RE: <% Session.Timeout = 45%> Question - 8/5/2005 11:35:23
quote:
ORIGINAL: Spooky You can do it that way Would you suggest something else? It seems setting it in IIS is not working. I've had to set it at page level for it to work.
|
|
|
|
mar0364
Posts: 3221 Joined: 4/5/2002 From: Florida, US Status: offline
|
RE: <% Session.Timeout = 45%> Question - 8/5/2005 16:03:34
I wasn't using the global.asa for that. How would I go about that?
|
|
|
|
mar0364
Posts: 3221 Joined: 4/5/2002 From: Florida, US Status: offline
|
RE: <% Session.Timeout = 45%> Question - 8/5/2005 18:19:14
Thanks! I will research that.
|
|
|
|
mar0364
Posts: 3221 Joined: 4/5/2002 From: Florida, US Status: offline
|
RE: <% Session.Timeout = 45%> Question - 8/5/2005 21:04:51
Spooky I think you've done it. Took this code from the global.asa. theory: I bet it is overriding the session.timout set on the server. That why the only way I could get the session.timeout to extend was at page level. If I increase that session.timout in the global.asa it should apply to the whole virtual directory?
Sub Session_OnStart
FrontPage_StartSession '==FrontPage Generated==
Session.TimeOut = 1
Session("start") = Now
Application.Lock
Application("visits") = Application("visits") + 1
intTotal_visitors = Application("visits")
Application.UnLock
Session("visitorID") = intTotal_visitors
Application.Lock
Application("active") = Application("active") + 1
Application.UnLock
End Sub
Thanks! Rich
|
|
|
|
mar0364
Posts: 3221 Joined: 4/5/2002 From: Florida, US Status: offline
|
RE: <% Session.Timeout = 45%> Question - 8/5/2005 22:32:07
Thanks for working with me on that brother!!
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|