View Single Post
Old October 27th, 2010, 11:03 AM
walbalooshi walbalooshi is offline
Authorized User
Join Date: Oct 2009
Posts: 22
Thanks: 2
Thanked 10 Times in 7 Posts
Default OutputCache Problem


On page 213 of your book you describe output caching when using Master Pages. There are two sentences about using the OutputCache directive on a master page:

1. You can't put it on a Master Page, because on the page's second retrieval you get an error because the application can't find the cached page.
2. The OutputCache directive on the master page will not cause the master page to produce an error, but it will not be cached. *I am assuming that you mean the first time it won't show an error, but the second time you call it you will get an error, like you mention in your first point*

Now, I tried putting a OutputCache directive on a Master Page, but I am not experiencing the same behavior you mentioned. Running a content page that uses this master page I instantly get an error stating:

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: The directive 'outputcache' is not allowed in this page.

So, am I just misunderstanding what you wrote or is this an error in the book.