I am facing an issue with httpContext in multi threaded .
In my project, all the request are authenticated at layer. In one case, say Thread T1 in one worker process is initialized when login into system and when processing some request, a new thread T2 is initiated in second worker process and then logged in user changes his/her . After completion of change , page gets refreshes successfully.
After this, whenever a new request is initiated in older worker process, the request is coming with old password.

Sharing all actions and sequence in shared image. I am trying to change my password from P1 to P2.

Problem is, if a thread is initiated in one worker process and password gets changes in another worker process. Any threads coming from previous worker process gets failed because of authentication because all those requests ‘s http is still with old password i.e. P1

Is there any way to synchronize all these threads of active worker process ?

enter image description here

NOTE : The problem does not exist if I change worker process count to 1 in application pool advanced setting. It exist only if it has multiple worker process.

Source link https://sqa.stackexchange.com/questions/35462/http-context-is--old-password-in-multi-threaded-environment-in-asp-net-ap


Please enter your comment!
Please enter your name here