我正在使用 dotCMIS 并希望简单地连接到我的 SP2010 服务器.我试图用 C# 来做到这一点,就像这里 chemistry.apache/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 chemistry.apache/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] = "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 问题(issues.apache/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 (issues.apache/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 连接器:technet.microsoft/en-us/library/ff934619.aspx
PS: And yes, before I started with dotCMIS I did install and configure the MS CMIS connector: technet.microsoft/en-us/library/ff934619.aspx
推荐答案是的,AtomPubUrl 是错误的.
Yes the AtomPubUrl was wrong.
对于 sharepoint,仅将默认 sp url (mysharepoint) 或 url 发布到 cmis lib (mysharepoint/cmis) 是不够的)我需要指向存储库 ID,不知何故 CMIS 的 sp 端点是:
For sharepoint its not enough to post the default sp url (mysharepoint) or the url to the cmis lib (mysharepoint/cmis) I need to point to the repository id, somehow the sp endpoint for CMIS is:
mysharepoint/_vti_bin/<myLib4CMIS>/<repID>?getRepositoryInfotechnet.microsoft/en-us/library/ff934619.aspx
不知何故,它令人困惑,但它的工作原理:) dotCMIS 非常好.
Somehow it was confusing, but its working :) dotCMIS is really nice.
更多推荐
通过 CMIS (dotCMIS) 连接到 SP2010:异常未授权
发布评论