G
Guest
Hi, I am trying to use a URL Rewriting technique outlined here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/urlrewriting.asp
Basically I create a HTTPHandlerFactory that scans whether the URL needs to
be rewritten, and if so, it passes back the Page built from the rewritten url.
I am trying to combine this with OutputCache or some kind of caching. Could
someone recommend me the best way to do this or perhaps what the typical way
to implement URL Rewriting and OutputCache together would be?
I've tried to modify the HttpContext object passed into the GetHandler
method of the IHttpHandlerFactory, but the following lines do not seem to
work:
context.Response.Cache.SetExpires(DateTime.Now.AddSeconds(60));
context.Response.Cache.SetCacheability(HttpCacheability.Public);
context.Response.Cache.SetValidUntilExpires(false);
context.Response.Cache.VaryByParams["ProductID"] = true;
Thanks!
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/urlrewriting.asp
Basically I create a HTTPHandlerFactory that scans whether the URL needs to
be rewritten, and if so, it passes back the Page built from the rewritten url.
I am trying to combine this with OutputCache or some kind of caching. Could
someone recommend me the best way to do this or perhaps what the typical way
to implement URL Rewriting and OutputCache together would be?
I've tried to modify the HttpContext object passed into the GetHandler
method of the IHttpHandlerFactory, but the following lines do not seem to
work:
context.Response.Cache.SetExpires(DateTime.Now.AddSeconds(60));
context.Response.Cache.SetCacheability(HttpCacheability.Public);
context.Response.Cache.SetValidUntilExpires(false);
context.Response.Cache.VaryByParams["ProductID"] = true;
Thanks!