I am facing an issue with httpContext in multi threaded environment.
In my project, all the request are authenticated at application 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 password. After completion of change password, page gets refreshes successfully.
After this, whenever a new http 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 context is still with old password i.e. P1
Is there any way to synchronize all these threads of active worker process ?
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.