我正在使用SharePoint的List Web服务,我尝试了GetListCollection,但它没有返回所有列表。这是我的代码(SBALists是我的网络参考名称):
Dim Lists As New SBALists.Lists
Lists.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials
Dim Result As XmlElement = Lists.GetListCollection
Dim XR As New XmlTextReader(Result.OuterXml, XmlNodeType.Element, Nothing)
Dim DS As New DataSet
DS.ReadXml(XR)
DataGridView1.DataSource = DS.Tables(0)
我还尝试传递我的用户名/密码以获取凭据,但不会更改结果。
Dim Cred As New Net.NetworkCredential("username", "password")
Lists.Credentials = Cred
知道为什么有些列表没有返回?
*编辑