Sharing HttpCache Across AppDomains?

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.
 
S

Scott Allen

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.
 
S

Steven Cheng[MSFT]

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.)
 

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

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top