Site caching causes login redirects to be persisted.

Vote:
 

Site caching causes login redirects to be persisted from previous users.

We have a page in episerver that is marked as read only for a particular group when a user that is not logged in goes to this url /Extranet/ they are prompted to login as normal after which they are sent to the requested page. However when caching is turned on (using the "httpCacheExpiration" attribute of the siteSettings node in web.config) they are sent to the wrong location and it seems its sending them to what was cached by the last user. Is there a a way to disable caching for these pages?

#45271
Nov 03, 2010 21:15
Vote:
 

Is episerver caching the redirect url query string? If this is the case how would we be able to prevent this from happening?

Example : "Templates/Public/Pages/login.aspx?ReturnUrl=/en/Extranet/Board-Extranet/"

#45272
Nov 03, 2010 23:13
Vote:
 

How does your httpCacheVaryByParams attribute in the siteSettings look? On a clean install it contains id,epslanguage meaning different pages and different language versions are cached separately. Are you missing the id attribute or are you perhaps varying your landing pages on a different parameter not included in the list? I have never had the need to add the ReturnUrl parameter to this list, but you could try that too.

#45274
Nov 04, 2010 6:47
Vote:
 

Ah, I see now that you are using a custom login page. Add <%@ OutputCache Location="None"%> to that page to keep it from being cached, that should solve your problem.

#45275
Nov 04, 2010 6:49