Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WCF RIA Services and persistant / static variables outside of session

I am wondering if there is a way to persist variables in the business layer once the clients session has ended in WCF RIA Services. The challange is we are going to be loading a fair amount of data into caching but want the cache to persist, and allow the silverlight client to connect to the cache without recreating it and reloading all the data.

Any ideas or work arounds?

Thank you, Derrick

like image 865
Derrick Avatar asked Feb 02 '26 06:02

Derrick


1 Answers

I presume the service is hosted on IIS. You can set the ASPNET compatibility on in a web service and then can use Application and Session variables.

Set this in Web.config: <serviceHostingEnvironment aspNetCompatibilityEnabled=”true” />

See: http://social.msdn.microsoft.com/forums/en-US/wcf/thread/71671241-eab0-4b9f-9343-6e4445ed41a5 and http://msdn.microsoft.com/en-us/library/ms733040.aspx

like image 106
Kangkan Avatar answered Feb 04 '26 22:02

Kangkan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!