0

I'm getting some data from the web service to my generic handler after uniform interval of 1 minute. I've a List type collection that holds each data received in the handler. with context.Application["mykey"] (which contains list).

In my web site, I gt all the data in this application object fine. But when day changes, i.e after 12 am, all the data is lost.

Is there a way, can I persist the data which was added to the list on previous day? Thanks.

1 Answer 1

1

IIS can shut down your application domain if it is not in use for 20 minutes default at any time, and it will start again with the same request. This process is called "recycling". Despite you can configure how long IIS must wait, it is good not to alter this behaviour.

What you should do is save that information in your App_Data folder, using XML or JSON. And in your Application_Start global event, take a look for that file and if it exist, deserialize it and put it in place.

You can use the cache for this if you set up a persistent cache provider.

Cheers.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.