31 lines
1.3 KiB
VB.net
31 lines
1.3 KiB
VB.net
|
|
Imports System.Web.Configuration
|
|
Imports System.Security.Cryptography
|
|
|
|
Partial Class login_Logout
|
|
Inherits System.Web.UI.Page
|
|
Function Page_Load() As Threading.Tasks.Task Handles Me.Load
|
|
FormsAuthentication.SignOut()
|
|
Session.Clear()
|
|
Session.Abandon()
|
|
'clear authentication cookie
|
|
'Dim cookie1 As HttpCookie = New HttpCookie(FormsAuthentication.FormsCookieName, "")
|
|
'cookie1.Expires = DateTime.Now.AddYears(-1)
|
|
'Response.Cookies.Add(cookie1)
|
|
'clear session cookie
|
|
'Dim sessionStateSection As New SessionStateSection
|
|
'SessionStateSection = WebConfigurationManager.GetSection("system.web/sessionState")
|
|
'Dim cookie2 As HttpCookie = New HttpCookie(sessionStateSection.CookieName, "")
|
|
'cookie2.Expires = DateTime.Now.AddYears(-1)
|
|
'Response.Cookies.Add(cookie2)
|
|
Response.BufferOutput = True
|
|
End Function
|
|
|
|
Protected Sub btn_backtostart_Click(sender As Object, e As EventArgs) Handles btn_backtostart.ServerClick
|
|
Response.Redirect("../login/login_FLEX.aspx")
|
|
End Sub
|
|
Protected Sub btn_backtostart_m_Click(sender As Object, e As EventArgs) Handles btn_backtostart_m.ServerClick
|
|
Response.Redirect("../login/login_FLEX.aspx")
|
|
End Sub
|
|
End Class
|