DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Fri, 17 Aug 2007 16:47:21 -0400,    posted on: microsoft.public.dotnet.framework.aspnet        back       

Thread Index
  1    Max2006 am
          2    Scott M. am
          3    bruce barker
          4    Steve C. Orr [MCSD, MVP, CSM, ASP Insider]
          5    (Steven Cheng[MSFT])
                 6    (Steven Cheng[MSFT])


Are Application collection and Page.Cache thread safe?   
Hi,

Since Application collection and Page.Cache can be shared among all 
sessions, I wonder if they are thread safe?

Thank you,
Max
Date:Fri, 17 Aug 2007 16:47:21 -0400   Author:  

Re: Are Application collection and Page.Cache thread safe?   
Max,

Thread safety is disclosed in the MSDN help topic for a given class.

-Scott


"Max2006" <alanalan1@newsgroup.nospam> wrote in message 
news:u01WM$Q4HHA.5216@TK2MSFTNGP05.phx.gbl...

> Hi,
>
> Since Application collection and Page.Cache can be shared among all 
> sessions, I wonder if they are thread safe?
>
> Thank you,
> Max
>
>
> 
Date:Fri, 17 Aug 2007 16:50:46 -0400   Author:  

Re: Are Application collection and Page.Cache thread safe?   
the collections are thread safe, but the objects you add to the 
collection may or may not be.

-- bruce (sqlwork.com)

Max2006 wrote:

> Hi,
> 
> Since Application collection and Page.Cache can be shared among all 
> sessions, I wonder if they are thread safe?
> 
> Thank you,
> Max
> 
> 
> 
Date:Fri, 17 Aug 2007 14:28:27 -0700   Author:  

Re: Are Application collection and Page.Cache thread safe?   
Cache is thread safe.
Application is also thread safe as long as you remember to use its Lock and 
Unlock methods.

-- 
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net


"Max2006" <alanalan1@newsgroup.nospam> wrote in message 
news:u01WM$Q4HHA.5216@TK2MSFTNGP05.phx.gbl...

> Hi,
>
> Since Application collection and Page.Cache can be shared among all 
> sessions, I wonder if they are thread safe?
>
> Thank you,
> Max
>
>
> 
Date:Sat, 18 Aug 2007 15:46:40 -0700   Author:  

RE: Are Application collection and Page.Cache thread safe?   
Hi Max,

Application State is provided in ASP.NET for compatible with classic ASP 
application and you need to perform lock/unlock over it to make sure 
thread-safe. Application Cache in ASP.NET is built-in thread safe, that 
means you can freely store and access objects in Cache entry without 
additional lock/unlock(or other synchronize operations). However, I agree 
with Bruce that you need to take care of the objects you want to store in 
Cache, whether the objects (you'll store in Cache, or to share them) is 
thread-safe is important if you'll take care of the concurrent accessing in 
your web application.

BTW, I also saw your another thread "Can we use static table adapters in 
highly concurrent web sites?" in the newsgroup, and some other members have 
also replied you there. Please feel free to have a look also.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
 	

This posting is provided "AS IS" with no warranties, and confers no rights.
Date:Mon, 20 Aug 2007 02:14:27 GMT   Author:  

RE: Are Application collection and Page.Cache thread safe?   
Hi Max,

Does the info in previous messages help you? If you have any other 
questions ,please feel free to post here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.
Date:Wed, 22 Aug 2007 09:54:35 GMT   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us