[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 4787
  • Last Modified:

Reset ASP.NET Cache from IIS Manager?

I'm being asked to look into a problem that occurs intermittently on a WebServer running my team's application.

Essentially, we have a webservice that does a lookup between codes. If you have Code Type A, you can use it to look up the corresponding Code Type B. Periodically, when memory is running low, when this webservice is called, a null reference exception is being thrown. Essentially, this service loads a lookup file into cache with a dependency on the file, so if the file chages, the cache is reloaded with the new file. The priority on the cache object is set to default. I'm guessing that somewhere in the code, it isn't being verified that the cache object is still there and when memory on the server gets low, that object is dumped causing the error. I'd like to be able to recreate the error and verify before I start digging into this code.

Is there a way in IIS manager (or from the command prompt) to force a running web app to dump it's cache? I would think that this should recreate the condition and therefore recreate the bug. Not to mention, seeing the detail error should lead to the right section of code.

Thanks,

Steve Brouillard
0
corwin_ranger
Asked:
corwin_ranger
  • 2
1 Solution
 
brwwigginsCommented:
I would put the app in it's own application pool and recycle the worker process
0
 
Praveen DMInfra Team LeadCommented:
Dump in sense do you want to clear the cache or do you want the cache to exixt in a live session without getting recycled..

If you would try to get a seperate application pool there are a lot settings that could be best to reset the cache and process in server...just make sure that the site's session's don't get reset...
0
 
corwin_rangerAuthor Commented:
I found a utility that can be added to ASP.NET apps that will allow you to dynamically manage the cache as a whole or individual cache objects. Thanks to .NET Rocks! and dnrtv.

Here's a link to the tool that I used. This allowed me to clear just the specific objects in question, on the fly, and prove the error.

http://aspalliance.com/cachemanager/default.aspx

Steve

0
 
Praveen DMInfra Team LeadCommented:
good luck steve.. :-)
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now