简体   繁体   English

远程服务器返回错误:(401)未授权的sharepoint

[英]The remote server returned an error: (401) Unauthorized sharepoint

Here is my scenario: 这是我的场景:

I have my Sharepoint server hosted on Domain A and I have my machine on Domain B . 我在域A上托管了我的Sharepoint服务器,我在域B上安装了我的机器。 There is not any trust between Domain A and Domain B . 域A和域B之间没有任何信任

I am trying to access the Sharepoint Document library from my machine to Sharepoint server which is on Domain A. 我试图从我的机器访问Sharepoint文档库到域A上的Sharepoint服务器。

Now when i used this code: 现在当我使用这段代码时:

ClientContext clientContext = new ClientContext(siteURL);
clientContext.Credentials = new System.Net.NetworkCredential(username,password,domain);
clientContext.ExecuteQuery();

I got the following error: 我收到以下错误:

The remote server returned an error: (401) Unauthorized 

I want to know if it is possible to access SharePoint document library accross the domain without having trust between each other? 我想知道是否可以访问域中的SharePoint文档库而不相互信任? The only solution I can think of is my machine should be on the Domain A. 我能想到的唯一解决方案是我的机器应该在域A上。

Update 更新

I transfered my machine on Domain A that is on that domain where sharepoint server is installed. 我在安装了sharepoint服务器的域上的域A上转移了我的机器。 Still same error getting at clientContext.ExecuteQuery(); clientContext.ExecuteQuery(); . I dont know why pelase help. 我不知道为什么pelase有帮助。

If the domains don't trust each other, it means that SharePoint box from domain A cannot retrieve account properties from domain's B domain controller. 如果域不相互信任,则意味着域A中的SharePoint框无法从域的B域控制器检索帐户属性。 When you access a particular SharePoint site for the first time, the "Users" list is populated with a new entry - your local user data (user name, SID, display name, email, SIP address) at that SharePoint site. 当您第一次访问特定SharePoint站点时,“用户”列表将填充新条目 - 该SharePoint站点上的本地用户数据(用户名,SID,显示名称,电子邮件,SIP地址)。 To fill this information, SharePoint tries to query your domain controller (which, in your scenario, cannot be done). 为了填充此信息,SharePoint尝试查询您的域控制器(在您的方案中,无法完成)。 So, the answer is - it won't work this way. 所以,答案是 - 它不会这样工作。

SharePoint 2010 Client Object Model - Proxy Authentication Required SharePoint 2010客户端对象模型 - 需要代理身份验证

This may be of help. 这可能有所帮助。

401 Unauthorized could simply be that your credentials and domain are incorrect so also check these. 401 Unauthorized可能只是您的凭据和域名不正确所以也请检查这些。 Also check that these have access to the site. 还要检查这些是否可以访问该站点。 I know it's basic but i have done it a few times as others have removed privlages without me knowing! 我知道这是基本的,但我做了几次,因为其他人已经删除了我不知道的权利!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 EWS:“远程服务器返回错误(401)未经授权” - EWS: “The remote server returned error (401) Unauthorized” 远程服务器返回错误:(401)未经授权 - The remote server returned an error: (401) Unauthorized 远程服务器返回错误:(401)未经授权 - The remote server returned an error: (401) Unauthorized 远程服务器返回错误:(401)未经授权 - The remote server returned an error: (401) Unauthorized Web 异常:远程服务器返回错误 (401) 未授权 - Webexception:remote server returned an error (401)unauthorized 远程服务器返回错误:(401)未经授权 - The remote server returned an error: (401) Unauthorized 远程服务器返回错误:(401)未经授权 - The remote server returned an error: (401) Unauthorized 远程服务器返回错误:(401) 在 Zendesk 中未经授权 - The remote server returned an error: (401) Unauthorized in Zendesk SharePoint 仅应用程序身份验证抛出“远程服务器返回错误:(401)未经授权。” - SharePoint App-Only Authentication throwing “The remote server returned an error: (401) Unauthorized.” Box API返回错误::远程服务器返回错误:(401)未经授权 - Box API returned Error : : The remote server returned an error: (401) Unauthorized
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM