c# task.factory startnew usage makes my website delog users from time to time
This is the order of my code:

i make multiple task.factory.startnew(()=> myFunction(myObject, httpSessionState))

i send the System.Web.SessionState.HttpSessionState  to myFunction because i dont wait for the tasks to end , so they run in background, and i cant get session inside myFunction becose System.Web.HttpContext.Current = null.

myFunction calls webservices and stores their result in the  httpSessionState object

then i make several ajax calls to get the session values from the server, until i have all the desired values.

PROBLEM:
I cant explain why users get de-logged from time to time. I asume the session becomes null.
All users get delogged at the same time. All session objects probably necome null
c# task.factory startnew usage makes my website delog users from time to time
===

This is the order of my code:

i make multiple task.factory.startnew(()=> myFunction(myObject, httpSessionState))

i send the System.Web.SessionState.HttpSessionState  to myFunction because i dont wait for the tasks to end , so they run in background, and i cant get session inside myFunction becose System.Web.HttpContext.Current = null.

myFunction calls webservices and stores their result in the  httpSessionState object

then i make several ajax calls to get the session values from the server, until i have all the desired values.

PROBLEM:
I cant explain why users get de-logged from time to time. I asume the session becomes null.
All users get delogged at the same time. All session objects probably necome null