OutputCache in web.config?

  • Thread starter =?iso-8859-1?q?Nils Hedstr=f6m
  • Start date
?

=?iso-8859-1?q?Nils Hedstr=f6m

I have noticed that it is possible to create a small "DOS"-attach in IE but
pressing the reload-button (this generates 30-50 requests/second). I want
to protect my ASP.NET-site from this kind of use by caching the output of
all aspx-pages for 1 or 2 seconds.

One way of accomplishing this is to put the following line in every aspx-file.
<%@ OutputCache Duration="2" VaryByParam="*" location="client" %>

But is there any way I can accomplish this without editing every aspx-file?
Like putting something in the web.config.
I guess it would be possible to let all the aspx-pages inherit from a custom
class that sets this attribute programmatically but at the moment I cannot
do that

/nisse
 

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

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,133
Latest member
MDACVReview
Top