HighTechTalks DotNet Forums  

WSE Session

Dotnet Framework (Webservices Enhancements) microsoft.public.dotnet.framework.webservices.enhancements


Discuss WSE Session in the Dotnet Framework (Webservices Enhancements) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Mike W
 
Posts: n/a

Default WSE Session - 10-17-2006 , 09:44 AM






We are currently developing a WSE 3.0 service for User Management.

To increase performance we would like to cache certain objects. But the
session object is always null inside of WSE.

We can use the HttpContext.Current.Cache object and it seems to work, but
here are my concerns:

Is this cache global across all calls to the wse service. This is important
because some items in the cache we remove and they need to be removed for
everyone.

Second, we would like to setup this service on 2 apps service and load
balance them. The cache obviously can't be shared across 2 machines. If we
could use the session we could use a session server.

Reply With Quote
  #2  
Old   
Pablo Cibraro [MVP]
 
Posts: n/a

Default Re: WSE Session - 10-18-2006 , 09:29 AM






Hi Mike,

First of all, the Cache is shared between all the web services configured in
the same web application and same machine.
If you are trying to use the session in a WSE filter or token manager, it
could be null because WSE runs before than the ASP.NET session module (Or
you are trying to use the Session in a web service hosted outside of the
ASP.NET worker process, for instance, a windows console). Anyway, the
purpose of the session is completely different, it does not support
different expiration rules as the cache does.
You can also try with the Enterprise Library Caching application block.

Regards,
Pablo Cibraro.


As you said, you can use a session server to share session information in
a web farm scenario, but the purpose of the session is completely different
from the purpose of the cache. (The cache supports

"Mike W" <MikeW (AT) discussions (DOT) microsoft.com> wrote

Quote:
We are currently developing a WSE 3.0 service for User Management.

To increase performance we would like to cache certain objects. But the
session object is always null inside of WSE.

We can use the HttpContext.Current.Cache object and it seems to work, but
here are my concerns:

Is this cache global across all calls to the wse service. This is
important
because some items in the cache we remove and they need to be removed for
everyone.

Second, we would like to setup this service on 2 apps service and load
balance them. The cache obviously can't be shared across 2 machines. If
we
could use the session we could use a session server.



Reply With Quote
  #3  
Old   
Michael Primeaux
 
Posts: n/a

Default Re: WSE Session - 10-18-2006 , 08:11 PM



Hi Mike,

The System.Web.Caching.Cache (accessed via HttpContext.Cache.Current) is a
process-wide cache. Therefore the cache is "global" to across calls to the
WSE service for the same machine (assuming you're executing the web service
within the same app pool). I say this because it possible to create multiple
instances of the web service each running under a different app pool.
However, the latter deployment scenario isn't a usual configuration.

I'm still unclear as to whether you require session or cache as their
consumer API surface design goals are entirely different. Would you please
tell me a bit more about your scenario?

Kindest regards,
Michael

"Mike W" <MikeW (AT) discussions (DOT) microsoft.com> wrote

Quote:
We are currently developing a WSE 3.0 service for User Management.

To increase performance we would like to cache certain objects. But the
session object is always null inside of WSE.

We can use the HttpContext.Current.Cache object and it seems to work, but
here are my concerns:

Is this cache global across all calls to the wse service. This is
important
because some items in the cache we remove and they need to be removed for
everyone.

Second, we would like to setup this service on 2 apps service and load
balance them. The cache obviously can't be shared across 2 machines. If
we
could use the session we could use a session server.



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.