通过 CMIS (dotCMIS) 连接到 SP2010:异常未授权 [英] Connecting via CMIS (dotCMIS) to SP2010: exception unauthorised

查看:12
本文介绍了通过 CMIS (dotCMIS) 连接到 SP2010:异常未授权的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 dotCMIS 并希望简单地连接到我的 SP2010 服务器.我试图用 C# 来做到这一点,就像这里 http://chemistry.apache.org/dotnet/getting-started-with-dotcmis.html 在第一部分

Im using dotCMIS and would like to do a simple connect to my SP2010 server. Im trying to do this with C# like here http://chemistry.apache.org/dotnet/getting-started-with-dotcmis.html in the first part

所以我有这样的事情:

    Dictionary<string, string> parameters = new Dictionary<string, string>();
    parameters[SessionParameter.BindingType] = BindingType.AtomPub;
    parameters[SessionParameter.AtomPubUrl] = "http://mysharepoint";
    parameters[SessionParameter.User] = "SPAdmin";
    parameters[SessionParameter.Password] = "1234sharepoint";

    SessionFactory factory = SessionFactory.NewInstance();
    ISession session = factory.GetRepositories(parameters)[0].CreateSession(); //exception unathorized

但我总是得到异常:DotCMIS.Expcetions.CmisRunterimException: Unathorised

有什么想法吗?通过浏览器,我可以使用相同的用户/密码登录该站点,所以这可能不是问题.起初我因为 NTLM 问题(https://issues.apache.org/jira/browse/CMIS-531) 但即使我使用 parameters[SessionParameter.AuthenticationProviderClass] = "DotCMIS.Binding.NtlmAuthenticationProvider"; 它也是同样的例外.嗯……这个例外并没有真正帮助我.我希望我能获得更多信息 - 也许有更好的方法?我还能尝试什么?谢谢!

Any ideas? Via browser I can login to the site with the same user/pass, so thats might be not the problem. At first I tought its because of the NTLM problem (https://issues.apache.org/jira/browse/CMIS-531) but even if Im using parameters[SessionParameter.AuthenticationProviderClass] = "DotCMIS.Binding.NtlmAuthenticationProvider"; its the same exception. And well... this exception is not really helping me. I wish I could get more information - maybe there is a better way? What else could I try? Thank you!

PS:是的,在我开始使用 dotCMIS 之前,我确实安装并配置了 MS CMIS 连接器:http://technet.microsoft.com/en-us/library/ff934619.aspx

PS: And yes, before I started with dotCMIS I did install and configure the MS CMIS connector: http://technet.microsoft.com/en-us/library/ff934619.aspx

推荐答案

是的,AtomPubUrl 是错误的.

Yes the AtomPubUrl was wrong.

对于 sharepoint,仅将默认 sp url (http://mysharepoint) 或 url 发布到 cmis lib (http://mysharepoint/cmis) 是不够的)我需要指向存储库 ID,不知何故 CMIS 的 sp 端点是:

For sharepoint its not enough to post the default sp url (http://mysharepoint) or the url to the cmis lib (http://mysharepoint/cmis) I need to point to the repository id, somehow the sp endpoint for CMIS is:

http://mysharepoint/_vti_bin/<myLib4CMIS>/<repID>?getRepositoryInfo

http://technet.microsoft.com/en-us/library/ff934619.aspx

不知何故,它令人困惑,但它的工作原理:) dotCMIS 非常好.

Somehow it was confusing, but its working :) dotCMIS is really nice.

这篇关于通过 CMIS (dotCMIS) 连接到 SP2010:异常未授权的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆