我试图连接到Sharepoint实例,通过第三方工具发布一些内容。Sharepoint 2010,ClientContext&401未授权
我没有Sharepoint实例的控制权,但我确信我的帐户具有完全权限。
ClientContext ctx = new ClientContext("https://thesharepointsite.com");
ctx.Credentials = new System.Net.NetworkCredential(@"username", "password", "domain");
Web w = ctx.Web;
ctx.Load(w);
ctx.ExecuteQuery();
在的executeQuery行,我得到异常:(没有内部异常)
The remote server returned an error: (401) Unauthorized.
我可以确认URL &凭据工作,当我通过浏览器登录。
基于this question,我的假设是它是一个权限问题。
如果是这样,那么我需要什么权限才能问?
其它问题我试过没有成功:
SharePoint Server Authentication Error
401 unauthorized exception while reading data from the document library SharePoint 2010
更新
我已经尝试了各种其他查询相同的回应。我们有一个Sharepoint,Office 365实例并且可以使用(使用Remote Authentication)。这也是为什么我相信它的某种权限或访问相关。
这是在客户的实例。我只有一个帐户。我相信如果我要求第二个,它会有同样的问题。
你能否让其他人尝试使用同一个程序,但用他们的用户/密码,只是为了查看这可能是你的帐户问题与代码问题? – Servy
您是否尝试过其他任何查询?也许只是从列表中获得一个你知道可以通过浏览器访问的项目? – Servy
@Servy,更新了更具体的问题。 –