R – SharePoint Last Modified Date and Anonymous Access

sharepointsharepoint-2007

Currently I'm trying to display the last modified date in my default.master page in MOSS 2007 doing the following:

<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

–Snip–

<SharePoint:DateTimeField FieldName="Modified" runat="server" ControlMode="Display"/>

However when I execute this under anonymous access I get the following error (it works fine if I'm authenticated in any way):

System.InvalidOperationException: Operation is not valid due to the current state of the object.

What needs to be done in order to enable Anonymous Access users Access to the LastModified Date field? Thanks!

Best Answer

Check the document and masterpage are published. Anonymous (and read only) users don't have access to the "latest" modified date, only modified date of the most recent publish.

Related Topic