Run IISRESET in an asp.net page?

D

Daren

Hi,

I have a site with page-level caching set at 10 minutes. However, when
I update it, I want to be able to empty the cache immediately, so
changes are seen right away. At present I manually run an IISRESET on
the server. How can I do this within an asp.net page?

Daren
 
G

Guest

You can create a bat file and have iisreset given there.

But, the big question would be... DO YOU REALLY NEED TO GO THE IISRESET WAY.
What if the page is hosted with 10 diff sites. All of them will go down
because of YOUR app. Not recommended. By the way, whenever you do any changes
in the bin folder, web.config, machine.config the appdomain will recycle and
so will your cache objects, because Application_OnEnd fires. All you need to
do in fact is to redeploy the application and .NET should take care of
everything else.

If you are using IIS 6.0, you can recycle your AppPool and that should work
as well. But to be honest, you shouldn't be going that route either.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,999
Messages
2,570,243
Members
46,836
Latest member
login dogas

Latest Threads

Top