You receive a new Web page instead of a cached Web page even though the SetSlidingExpiration method is set to true on a computer that is running the .NET Framework 2.0 (909643)



The information in this article applies to:

  • Microsoft .NET Framework 2.0

SYMPTOMS

When you try to configure a Microsoft ASP.NET Web page to use a sliding expiration on a computer that is running the Microsoft .NET Framework 2.0, you receive a new Web page from the server instead of a cached Web page.

This issue occurs even though the SetSlidingExpiration method is set to true.

CAUSE

This problem occurs because a request to the origin server always generates a response when the SetSlidingExpiration method is set to true. A value of true sets cache expiration to sliding.

WORKAROUND

To work around this issue, use one of the following methods to prevent the origin server from generating a response when the SetSlidingExpiration method is set to true:
  • Response.Cache.SetLastModifiedFromFileDependencies
  • Response.Cache.SetETagFromFileDependencies
  • Response.Cache.AddValidationCallback

STATUS

This behavior is by design.

MORE INFORMATION

For more information about the Response.Cache.SetLastModifiedFromFileDependencies method, visit the following Microsoft Developer Network (MSDN) Web site:For more information about the Response.Cache.SetETagFromFileDependencies method, visit the following MSDN Web site:For more information about the Response.Cache.AddValidationCallback method, visit the following MSDN Web site:

Modification Type:MajorLast Reviewed:11/23/2005
Keywords:kbtshoot kbcode kbprb KB909643 kbAudDeveloper