Extranet caching trouble

Topics: General, Troubleshooting
Jul 22, 2011 at 9:51 PM

We're having some issues with extranet "caching" the login status of the current user. 

We have buttons in the navigation for login/register that change to logout/my account.  When jumping around from page to page after logging in, they sometimes switch back to the logged out state, but then going to the next page will make them be the correct logged in state. 

I've tried commenting out the <%@ OutputCache Duration="60" VaryByParam="*" VaryByCustom="C1Page" %> line in Page.aspx, which was suggested in a similar post I made.  That doesn't seem to help very much.

One thing I have noticed, is that if I add an extra parameter to the URL, like a &time=123456 (or using system ticks or something random), the state of the pages is then correct.  It's almost like the pages need a full refresh when on the page to make sure they are happy. 

Are there any tweaks/settings for something like this, or does this ring a bell for anyone?  I hate to ugly up my pretty URL's with these extra parameters in them, but that seems to be the only way to get a real fresh page to be displayed.

As always, thanks for any suggestions you can throw out there.


Jul 25, 2011 at 8:44 AM


It is known cache issue with Extranet Login/Logout status and generally the solution is to disable page caching in file ~\Renderers\Page.aspx and  it is strange that it doesn't help.

Could you try another solution. On the function where you have navigations for login/register disable cache by adding following code:



If your links in XSLT, then you can add this code something like this:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	exclude-result-prefixes="xsl in lang csharp"

	<xsl:template match="/">

					<xsl:value-of select="csharp:SetNoCache()" />
					<div class="LoginStatus">

	<msxsl:script implements-prefix="csharp" language="C#" xmlns:msxsl="urn:schemas-microsoft-com:xslt">
		<msxsl:assembly name="System.Web"/>
     public void SetNoCache()



Jul 25, 2011 at 10:52 PM

Adding the code in the page seems to have fixed it up pretty good.  We'll do more extensive testing, but right now, it's looking pretty good.  Thanks a bunch.