ASP.NET OutputCacheとCookieで提案されているように、Global.asax.vbのApplication_EndRequestにCookieを設定しようとしています。
私は次のコードを書きました、cookieはERROR
値を取得します。
なぜセッションが利用できないのですか?
Sub Application_EndRequest(ByVal sender As Object, ByVal e As EventArgs)
Dim context As HttpContext = HttpContext.Current
If Not context.Session Is Nothing Then
context.Response.Cookies("T").Value = context.Session("T")
Else
context.Response.Cookies("T").Value = "ERROR"
End If
End Sub