I have a site written in two languages, Classic ASP and PHP. I have a system to keep a user logged in on both languages that basically involves ASP asking a PHP script "hey, am I logged in?" via Post. Overall it works pretty well, but there is an issue where the ASP Session will occasionally end unexpectedly, but the user is still logged in on the PHP end.
So what I'm trying to do is set up the ASP Global.asa
file with a Session_OnEnd
sub that redirects to the PHP script that logs the user off PHP. That way, if the ASP Session ends, the user is just logged off entirely, rather than remaining "half logged in"
This is my entire Global.asa
file:
<!--METADATA TYPE="TypeLib" NAME="Microsoft ActiveX Data Objects 2.8 Library" UUID="{2A75196C-D9EB-4129-B803-931327F72D5C}" VERSION="2.8"-->
<script language="vbscript" runat="server">
sub Session_OnStart
Session.CodePage = 65001
Session.LCID = 1033
end sub
sub Session_OnEnd
Response.Redirect("/login.php?logout")
end sub
</script>
Long story short, the redirect doesn't work. I'm testing by running an ASP script that does a Session.Abandon
. The session ends, but no redirect happens.
The server is IIS 10 running on Windows Server 2016.
Any idea what I'm doing wrong?
UPDATE: I'm pretty sure the Sub is simply not being triggered; and its not a failure of the redirect itself