General discussion

Locked

ASP Application - Global.asa

By vfarina ·
I am having trouble with my web application recognizing the global.asa file. I know for sure it is not getting cached, because when my Session Times out, it doesn't do a redirect. See Code Below.

I have changed the folder properties on IIS to make the folder an Application folder, but that didn't seem to make a difference. I am out of ideas.

------------------
<SCRIPT LANGUAGE="VBScript" RUNAT="SERVER">
Sub Session_OnStart
Session.Timeout = 10
Response.Redirect("tix.asp")
End Sub

Sub Session_OnEnd
Response.Redirect("timeout.asp")
End Sub
</SCRIPT>
-------------------

Is there another IIS setting that needs to change?
Any help would be appreciated.

Vince

This conversation is currently closed to new comments.

4 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

No User

by |_|di In reply to ASP Application - Global. ...

First, from a design perspective:

When a session times out ( after an interval which you specify ) it usually means that the user is gone. That is not the time to try to send them to a different page, but to clear out any memory you may have usedfor them, or possibly writing out to a log file, db, etc, information you stored about their visit.

From a technical perspective:

The server has lost any connection it had with the client. You must remember that the ASP call to Response.Redirect generates HTTP headers which make the browser generate a request to the new URL. This obviously can't be done at the end of a session.

Collapse -

I concur

by williamsbyron In reply to No User

There is no user at this time and there is no request so a response is nonexistant. If you are looking far a page to refresh after a certain time then you would want to put that in the page that actually goes to the client in a meta tag. I don't remeber the exact syntax but I believe <meta refresh=60> would be 60 seconds. If you are looking to make the page expire then you would put that in the page that returns to the client also using response.expires. I hope this helps.

Collapse -

Try this out

by achitse In reply to ASP Application - Global. ...

Hi,

The following 2 things can be tried out...

1) Check the cookie setting on the agent (Cookies should be enabled).

2) This is a way out, but may not practical in many scenarios.

Write an include as follows, and include it in every pageor in a page which is included in every page...

<SCRIPT LANGUAGE="VBScript" RUNAT="SERVER">
'The Session("InProgress") is assigned the value = 1 in Sub Session_OnStart

if Session("InProgress") = 0 then Response.Redirect("timeout.asp")
</SCRIPT>


Achit

Collapse -

Try this out

by achitse In reply to ASP Application - Global. ...

Hi,

The following 2 things can be tried out...

1) Check the cookie setting on the agent (Cookies should be enabled).

2) This is a way out, but may not practical in many scenarios.

Write an include as follows, and include it in every pageor in a page which is included in every page...

<SCRIPT LANGUAGE="VBScript" RUNAT="SERVER">
'The Session("InProgress") is assigned the value = 1 in Sub Session_OnStart

if Session("InProgress") = 0 then Response.Redirect("timeout.asp")
</SCRIPT>

Will let you know if anything else, would solve the problem efficiently.

Achit

Back to Web Development Forum
4 total posts (Page 1 of 1)  

Related Discussions

Related Forums