开发者

Dealing with Sharepoint locked Site Collections

I am playing with an application that can crawl the contents of sharepoint server. But I got a problem while working wit开发者_Python百科h Locked Site collections.

There are some methods that cannot be used with locked site collections. It throws an exception telling me the contents are blocked.

So I want to handle this more gracefully by checking whether a collection is locked. How can I do this?

Update : One more addition. The site collection has been locked using stsadm NOT programatically. So the SPSite.ReadLocked property has no use.


I looked at the source code of the setsitelock command; typing

stsadm -o setsitelock -lock readonly

results in (pseudo-code):

    SPSite.ReadLocked = false;
    SPSite.WriteLocked = false;
    SPSite.ReadOnly = true;

The ReadOnly property is interesting, because it is only true when the lock is of type 'readonly'.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜