views:

182

answers:

2

Hi there, 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!

A: 

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.

Nat
Close, but can I get them access somehow is what I was wondering...
tekiegreg
A: 

This works fine for me, anonymous users are allowed to see the "Modified" field. If the page is not published your anon users should not be able to see the page, let alone the modified field.

Anon users should not be able to see anything but published versions of master, pagelayout and page.. if these are all published and approved, what else are you doing that could cause this error?

ArjanP