Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / March 2008

Tip: Looking for answers? Try searching our database.

ASP.Net and Thread.GetNamedDataSlot

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Aamir Mahmood - 19 Mar 2008 20:52 GMT
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.
Cowboy (Gregory A. Beamer) - 19 Mar 2008 21:07 GMT
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?

Signature

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!

*************************************************
> Hi,
> Is is safe to use Thread.GetNamedDataSlot  function inside a ASP.Net
[quoted text clipped - 6 lines]
>
> AM.
Aamir Mahmood - 19 Mar 2008 21:27 GMT
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.

>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%.
[quoted text clipped - 15 lines]
>>
>> AM.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.