I'm having a weird problem with my web application, and I can't find the solution to it.
I'm using a Java applet to read some data from an electronic ID. This applet posts its captured data to a HttpHandler class and stores the data back in some session variables. It all works smoothly, unless in some cases.
Every time a do a new publish to the webserver or the website isn't touched for some time. There is a problem with the session.
The applet can't find a session cookie, and so it crashes.
I did some tests and indeed, the cookie ("ASP.NET_SessionId") does not exists. But it seems that other session variables (user login, etc) are working fine.
To make sure that the cookie for the session ID is readable from the applet I do the following in the global.asax:
Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)
' Code that runs when a new session is started
Dim isSessionFound As Boolean = False
If Response.Cookies.Count > 0 Then
For Each s As String In Response.Cookies.AllKeys
If s = "ASP.NET_SessionId" Then
Response.Cookies("ASP.NET_SessionId").HttpOnly = False
isSessionFound = True 'just for test
View Complete Post