开发者

SharePoint Last Modified Date and Anonymous Access

开发者 https://www.devze.com 2022-12-18 05:14 出处:网络
Currently I\'m trying to display the last modified date in my default.master page in MOSS 2007 doing the following:

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 followi开发者_JAVA百科ng 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!


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.


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?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号