获取是否使用 SharePoint WebServices 检查 "Allow management of content types"

Get if "Allow management of content types" is checked using SharePoint WebServices

无论 "Allow management of content types" 是否选中,我都需要有关 SharePoint 文档库的信息。我必须使用 SharePoint 网络服务。

我在 Lists.asmx 中的 GetListAndView 方法中进行了查找,但在 "List" 节点或 "View" 节点中没有找到引用内容类型管理的属性。

有人可以帮我吗?

谢谢:)

可以从lists.asmx的GetList()方法中获取。查看 Flags 属性。

更好的是,这里有一些来自 https://social.technet.microsoft.com/Forums/sharepoint/en-US/9d6c26a5-279e-4f4e-8dfc-b31acff81813/web-service-to-check-if-the-management-of-content-types-are-allowed?forum=sharepointgeneralprevious

的示例代码
public static bool GetAllowContentTypes(string listName)
  {
            listservice.Lists ls = new listservice.Lists();
            ls.Url = "http://basesmc2008/_vti_bin/lists.asmx";
            ls.UseDefaultCredentials = true;
            UInt64 flags = 0;
            bool contentTypesAllowed = false;

            XmlNode node = ls.GetList(listName);
            XElement element = XElement.Parse(node.OuterXml);

            var result = from e in element.Attributes("Flags")
                                                  select  e.Value;

            if (result != null && UInt64.TryParse(result.First().ToString(), out flags))
                contentTypesAllowed = ((flags & ((ulong)0x400000L)) != 0L);
            else
                return false;

            return contentTypesAllowed;

}