J
Jeremy Cowles
Hi all,
Here is the issue:
On postback, I spawn a new thread using the following code:
Dim NewThread As New Thread(AddressOf ProcessFile)
NewThread.Priority = ThreadPriority.Lowest
NewThread.Start()
Response.Redirect("loading.aspx")
ProcessFile() is a method in the code-behind class of the currently
executing page. After the thread spawns, any time I access the Session
object I get the following exception:
System.Runtime.Serialization.SerializationException
I have fixed the exception by adding the following line to the
Page_Load event:
Response.Cache.SetCacheability(HttpCacheability.NoCache)
This seems totally strange to me, does anyone know why this fixed the
error?
Thanks,
Jeremy
Here is the issue:
On postback, I spawn a new thread using the following code:
Dim NewThread As New Thread(AddressOf ProcessFile)
NewThread.Priority = ThreadPriority.Lowest
NewThread.Start()
Response.Redirect("loading.aspx")
ProcessFile() is a method in the code-behind class of the currently
executing page. After the thread spawns, any time I access the Session
object I get the following exception:
System.Runtime.Serialization.SerializationException
I have fixed the exception by adding the following line to the
Page_Load event:
Response.Cache.SetCacheability(HttpCacheability.NoCache)
This seems totally strange to me, does anyone know why this fixed the
error?
Thanks,
Jeremy