views:

97

answers:

0

I know that LocalDataStoreSlot can be sued to stored thread scoped data. Now If I want to use it in asp.net, I want to Write following code during when web request begin

string slotName = "xyz"; var slot = Thread.AllocateNamedDataSlot(slotName); Thread.SetData(slot, "some string");

so I can get the data in the same thread

Now I forget write "Thread.FreeNamedDataSlot(slotName)" before the page unload, this thread will be return to thread pool and will be used to serve new web request.

The question is, will this slot data be carried over to new web request handling?

Thanks