applicationstate

How to access the Application[] collection from a WCF web service

I used to use .ASMX web services, but I'm trying to move to WCF because it's the latest newest thing, and it's supposed to be better. Anyway, what I'm wanting to do is really really simple : create a webservice that empties the Application collection by calling Application.Clear(). In an ASMX web service, this is really really simple, ...

Saving contents of ApplicationState in ASP.Net (MVC)

I have an internal app used to edit XML files on disk. The XML files are loaded into an object model which is stored in ApplicationState. I need to save this data. The one option is to do this every time the user changes some data. However, this seems a bit inefficient - writing the data out to disk each time a change is made. Instead,...

Access Application State from outside a Page

I'm trying to access the Application State from a utility class in the web application but I'm not sure of the best way to do it. I looked for a static member but there is none of use (I was thinking somewhere along the lines of HttpContext.Current). The best solution I found so far is to have a member in the utility class that will be ...

iPhone setting NSUserDefaults to nil when app is closed or in background

I want to eliminate all of the variables saved into all fields of NSUserDefaults whenever the app is closed or running in the background for a certain amount of time - say 5 minutes. I tried to add a line to the app delegate of applicationDidFinishLaunching that looks like this: if (UIApplicationStateBackground == TRUE) { NSUserDef...

ASP.NET Application ending immediately after starting

Having a bit of a problem with my hosted ASP.NET applications. I noticed slowness when opening pages, the kind of slowness that you see the first time you start up an ASP.NET app. After researching, I'm finding that the Application_End event is firing shortly after the application starts, apparently killing the sessions, static values, e...