Propogate ExecutionContext when run in IIS
See original GitHub issueMoving bug from the codeplex as it is still an issue for us with no easy solution.
If you develop OWIN middleware for monitoring you need to use ThreadAsync
or CallContext
to keep the context across the async/await
. And it is working fine. However if you try to use the same middleware when hosting your application in IIS - it doesn’t propagate the context any longer.
Even better if there will be a possibility to set the context from HttModule
’s Begin
callback that will be preserved to the controller execution.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:20 (9 by maintainers)
Top Results From Across the Web
IIS Best Practices
The content folder should only need "read" and "read and execute" permissions. If your application needs to write something (like logs or temp ......
Read more >Timers that capture the execution context, evil AsyncLocal and ...
Timers that capture the execution context, evil AsyncLocal and the quick and ugly solution used by Microsoft devs.
Read more >ASP.NET Process.Start work background in task Manger ...
EXE file in mvc 3 application when we run this project locally on browser it work perfectly . Problem is that when we...
Read more >Performance Impact and Troubleshooting IIS Worker ...
Open IIS management console, you can view the running worker process and select the IIS application pool in question which is causing high...
Read more >How to Troubleshoot an ASP.NET Crash & Analyze w3wp ...
Run (ExecutionContext executionContext, ContextCallback callback, ... To identify the root cause of a w3wp crash, you are going to want a ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@davidfowl , can you please elaborate on this. Did you mean that
ExecutionContext
can be lost betweenPreRequestHandlerExecute
and the next step if Action (on a Controller) processing the request is anasync
method? If so then why?Remember that things have changed too in .NET Core. my approach is working fine on .NET Core 2 too