Skip to content

Question: Is Asp.net Core Thread-agile with Kestrel behind IIS? #1371

@FlorianRainer

Description

@FlorianRainer

I'm digging around already for some days to figure out how to replace the "System.Web.HttpContext.Current.Items" Collection used in my .Net 4.6 WebApi.
I can't rewrite it from scratch for this i need a static collection to set values for each request.

I have made some Tests with [ThreadStatic] Properties and it seems to work on my local IIS Express.
But i know there was always a problem on Asp.Net if you use [ThreadStatic] if IIS migrates the request from one Thread to another.

But now IIS is forwarding the Requst to a DNX process and the Request will be processed by "Kestrel" (i think)

Can anyone tell me how the Thread Pooling works now?
Is Kestrel doing it the same way as IIS does?
Are Requests still migrated between Threads, or are the assigned to one Thread?
Can we use [ThreadStatic] now or is there any replacement for the System.Web.HttpContext.Current.Items Collection?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions