Question : Saving List in ASP.NET for use in second WCF Service

I have a working Silverlight Enabled WCF Service for getting data back into my SL4 app. This is working well.

I have now added a second SL WCF Service for reporting. This service will call the same SQL Stored Procedure, as the first service. So, what I'm looking at doing is cutting down on work the Server has to do, by storing the results List of the first service, so the second service can retirieve this List, instead of having to run the SQL SP and populate another List.

The 2 services will ALWAYS be called together. I tried adding everything into 1 service, but the Report Service uses a different contract.

I tried to use HttpContext.Current.Session. The First service set the session, but the second service call returned NULL.

Is there another way to store a List, for passing between Services on Server side?

Answer : Saving List in ASP.NET for use in second WCF Service

Have you tried the Application object for storing state? It's scope is broader than Session, although perhaps not broad enough to span both services. Do both services exist in the same application pool in IIS?

Application.Add("mySharedList", myList);
Random Solutions  
 
programming4us programming4us