SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using SharePoint 2010.

I have a custom user control on a publishing page layout. When an authenticated user visits a page that uses the page layout everything works fine. When an anonymous user visits a page that uses the page layout, the content that should come from the user control is not shown. After some debugging I determined that the page life-cycle events (i.e. Render and CreateChildControls) are not firing on the user control when an anonymous user visits the page.

Anyone experienced this before?

share|improve this question
are you sure that your control is not wrapped by a SPSecurityTrimmedControl or sg like that ? Forget that the default control does not allow anoymous permissions to be set on – GillouX Aug 3 '11 at 18:04
"Forget that the default control does not allow anoymous permissions to be set on" - can you please rephrased this, I don't understand. – Rob Windsor Aug 3 '11 at 18:14
I think I remember there being a problem like this in the SP2010 Beta, but I thought for sure it was fixed in the RC or RTM. Just curious...if you put a Page_Load event in the user control code-behind, does it fire? – Rob D'Oria Aug 3 '11 at 20:24
When you use the SPSecurityTrimmedControl, you must set a level of permissions. Anonymous level is not one of them. And my guess is that you didn't extend it to allow anonymous permission level. – GillouX Aug 4 '11 at 7:43
up vote 0 down vote accepted

It turns out the culprit was an EditModePanel. As soon as I took the control out of the panel it worked fine. I checked and the same applies to standard server controls (e.g. TextBox), they do not render for anonymous users when inside an EditModePanel.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.