ASP.Net and Thread.GetNamedDataSlot

  • Thread starter Thread starter Aamir Mahmood
  • Start date Start date
A

Aamir Mahmood

Hi,
Is is safe to use Thread.GetNamedDataSlot function inside a ASP.Net
application?

I am afraid if IIS manipulates the threads and my DataSlot is lost in that.

Thanks.

AM.
 
I am very leery of multi-threading code in a web application. While .NET is
very good at cleaning up after mistakes, it is not 100%.

Not sure on that particular call, however.

Why do you need multi-threading in your web app?

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://gregorybeamer.spaces.live.com/lists/feed.rss

*************************************************
| Think outside the box!
|
*************************************************
 
Actually i am not using multi-threading in the ASP.net code. The problem is
that huge amount of code has been written. But due to a design flaw, now I
need to send some information to an external assembly. The only way I can
think of is to use the Data slot. So that i can set it on the code behind,
and up in the callstack the external assemly can retrieve that data.

I know it is not a good solution. But this is the only way I can think of.

Only thing I am afraid is that if IIS (not my code) completes the web
request with more than one (sequentially run) threads. And the data that I
set to the thread at code behind, is not available in the external assembly
because IIS messed with it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top