【发布时间】:2015-05-18 20:17:01
【问题描述】:
我正在尝试使用 Web 服务 (http://test.sharepoint.com/_vti_bin/Lists.asmx) 从我的 ASP.NET 代码在 Sharepoint 站点中创建列表。我使用的代码如下。我确定我有足够的权限访问该共享点站点。
sharepoint.enhanced1.Lists wsLists = new SharePoint_Test.sharepoint.enhanced1.Lists();
wsLists.PreAuthenticate = true;
wsLists.Credentials = System.Net.CredentialCache.DefaultCredentials;
wsLists.AddList("Test_Code", "testing", 103);
此代码给了我错误:- 请求失败,HTTP 状态为 401:未授权。 谁能帮我解决这个问题。
【问题讨论】:
-
它只与授权有关。交叉检查您的凭据和访问权限。
-
好吧,我可以访问 sharepoint 站点(完全访问权限),并且可以从 sharepoint 手动创建列表。不确定还需要什么其他访问权限。
标签: asp.net web-services sharepoint