Caching block from multiple domains

M

Mike

Hi! My application spans multiple domains on the server side. I need to cache
some db records into Microsoft Caching block. Is there a way to make it
accessible from
all domains the application explicitly creating? I know there is a SetData()
method on the AppDomain, but it requires serializable objects - something I
can not guarantee.

So, is there a way to access the Caching block from multiple domains?

Many thanks in advance for your help.

Sincerely,

--M
 
J

Jeff Johnson

Hi! My application spans multiple domains on the server side. I need to
cache
some db records into Microsoft Caching block. Is there a way to make it
accessible from
all domains the application explicitly creating? I know there is a
SetData()
method on the AppDomain, but it requires serializable objects - something
I
can not guarantee.

So, is there a way to access the Caching block from multiple domains?

Many thanks in advance for your help.

I'm pretty sure you'll have better luck asking this in an ASP.NET group,
since that's where folks are most likely to be using the Caching block.
 
A

Arne Vajhøj

Hi! My application spans multiple domains on the server side. I need to cache
some db records into Microsoft Caching block. Is there a way to make it
accessible from
all domains the application explicitly creating? I know there is a SetData()
method on the AppDomain, but it requires serializable objects - something I
can not guarantee.

So, is there a way to access the Caching block from multiple domains?

If you need to move something between app domains then it needs
to be serializable.

Arne
 
M

Mr. Arnold

Mike said:
Hi! My application spans multiple domains on the server side. I need to cache
some db records into Microsoft Caching block. Is there a way to make it
accessible from
all domains the application explicitly creating? I know there is a SetData()
method on the AppDomain, but it requires serializable objects - something I
can not guarantee.

Why can't you guarantee it? You got the db records from somewhere. You
can make a public accessor object with public properties using the
serialize attribute and load it to a List<T>, populating the object from
a db record.

http://www.java2s.com/Tutorial/CSharp/0240__Assembly/Anobjectinanotherapplicationdomain.htm

The fist example in the link below shows how to use a Arraylist so you
can do the same thing with a List<T> of objects that are marked
[Serializable]. I would think.

<http://www.java2s.com/Tutorial/CSharp/0240__Assembly/GetandsetdatatoAppDomain.htm>

<http://geekswithblogs.net/ranganh/a...ithout-silverlight-in-visual-studio-2010.aspx>

You can use auto property public properties of the public class/object.

So, is there a way to access the Caching block from multiple domains?

The other way to do it is to use HttpContext to cache the data.

http://www.csharpfriends.com/articles/getarticle.aspx?articleid=411

Either way, you can't expect the data to be in volatile memory all the
time. So if it's not there, then you need to go get it again.
 
M

Mike

Hi! Thank you for taking a look but it's a WinForms app and I am talking
about Server portion.
 

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

Top