0

I've just updated a mvc 2 project to mvc 3 . I have the following attribute on my controller: [OutputCache(NoStore =true, Duration = 0, VaryByParam = "*")] this gives me the following exception : Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerAsyncWrapper'.

If I remove the attribute it's fine, but I need this attribute to prevent caching in this controller.

any ideas?

1
  • Is this for a partial view by any chance? Here's a similar problem, maybe there are some clues there. Commented Apr 27, 2011 at 2:55

1 Answer 1

2

The attribute is no longer supported in MVC3

From Scott Gu's blog

ASP.NET MVC 3’s output caching system no longer requires you to specify a VaryByParam property when declaring an [OutputCache] attribute on a Controller action method. MVC3 now automatically varies the output cached entries when you have explicit parameters on your action method – allowing you to cleanly enable output caching on actions using code like below:

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.