Jul 23, 2018 02:27 AM|Edward Z|LINK
As the suggestion from mgebhard, it is unreasonable to access “HttpContext” from “IHostedService”.
“HttpContext” is according to the request between client and server, but “IHostedService” is not related with request, it is only a service which run behind web project. There is no relationship between “HttpContext” and “IHostedService”.
>> xample of one session: Account verification -> Enter additional parameters -> Payment. And I want to monitor in real time everything that happens on the site. It's almost like telemetry but not for Azura.
For this requirement, I am wondering whether there is any issue that you could not log the User behavior while using session to save User behavior.
If you need to retrieve from “Session”, you may try middleware as the suggestion from mgebhard to access “HttpContext”.