SaaS CMS has officially launched! Learn more now.

Site caching causes login redirects to be persisted.


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?

Nov 03, 2010 21:15

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/"

Nov 03, 2010 23:13

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.

Nov 04, 2010 6:47

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.

Nov 04, 2010 6:49
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.