Classic ASP: Multiple ASPSESSIONID in cookies

后端 未结 7 1076
悲&欢浪女
悲&欢浪女 2020-12-01 21:07

I have a problem with a classic asp page and I just cannot solve it since 3 days.

The page is working with Sessions - sometimes it happens that the ASPSESSIONID cook

7条回答
  •  没有蜡笔的小新
    2020-12-01 21:48

    In global.asa file:

    Sub Session_OnStart
    
        Dim cookie, cookies : cookies = Split(Request.ServerVariables("HTTP_COOKIE"),";")
        For Each cookie In cookies
            cookie = Trim(Split(cookie,"=")(0))
            If Left(cookie,12) = "ASPSESSIONID" Then
                Response.AddHeader "Set-Cookie", cookie&"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/"
            End If
        Next
    
    End Sub
    

提交回复
热议问题