Sharing HttpCache Across AppDomains?

  • Thread starter Thread starter localhost
  • Start date Start date
L

localhost

I have a web page that instances a .cs class (lets call it ClassX) in
a code-behind. ClassX performs some work and saves a result into
HttpRuntime.Cache.

I plan to move ClassX out of the web app binary assembly completely,
compile it into a discrete DLL in a new assembly. Then the original
web page code-behind would use Remoting to talk to ClassX.

1. Will ClassX be able to save anything in HttpRuntime.Cache at all?

2. Will the original web page be able to get things out of
HttpRuntime.Cache that ClassX places in it in the first place?


Thanks.
 
The Cache is strictly per appdomain. I don't think it would be easy to
maintain an application that communicted implicitly by passing values
around in a cache.
 
Hi Localhost,

As for this problem,I agree with Scott. Since the ASP.NET appliation is
application based and each application is restricted by appDomain boundary,
I think we'd better store the data all in the web appliaiton's cache. And
if you're calling a certain class object in aother appdomain via remoting,
you need to return the processed data from the remote object's proxy object
everytime so that we can store it in the web application's Cache.

Thanks.


Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
Back
Top