When writing some aysnc controllers in ASP.NET MVC2, I came across a situation where I had to call AsyncManager.Sync. I became interested:
AsyncManager.Sync
When do I get HttpContext.Currentwhat happens? How does ASP.NET know what HttpContextI need? How is the current context associated with this thread and how is it retrieved?
HttpContext.Current
HttpContext
Thread- bound storage is used, this is called Thread Local Storage .
, , , . , HttpContext.Current TransactionScope. "" , . \ .
TLS, ThreadStaticAttribute Thread.SetData\GetData.
Source: https://habr.com/ru/post/1777800/More articles:javascript bookmark icon - javascriptGit clone issue; fatal: index package failed - gitNormalizing various properties with similar data types - database-designhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1777798/converting-markdown-lists-to-html-lists-in-php&usg=ALkJrhiwTeUjFzyvLTN5OlzEOD7AAdHY7gEntity Framework - request for inheritance - inheritanceAdvantages of the ArrayAccess interface in PHP? - arraysЗапустить процесс приложения Delphi 7 в .net - .netDynamically change jQuery window thickness - javascriptEclipse PDT doesn't highlight PHP syntax in .html files? - eclipsehttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1777805/facebook-js-sdk-accesstoken-in-plain-text-and-security&usg=ALkJrhi7Jak13akI8B-thhY6xqZayZWN6QAll Articles