【问题标题】:Connecting via CMIS (dotCMIS) to SP2010: exception unauthorised通过 CMIS (dotCMIS) 连接到 SP2010:异常未授权
【发布时间】:2012-06-08 00:48:02
【问题描述】:

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

所以我有这样的事情:

    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";,它也是同样的例外。好吧......这个例外并没有真正帮助我。我希望我能获得更多信息——也许有更好的方法?我还能尝试什么?谢谢!

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

【问题讨论】:

    标签: c# apache sharepoint cmis dotcmis


    【解决方案1】:

    您的 AtomPubUrl 看起来很可疑。我不知道这是否是您添加的占位符来掩盖真实 URL,或者这是否是您正在使用的实际 URL。如果它是实际的 URL,它看起来好像缺少 AtomPub 服务文档的路径。要判断是否是这种情况,您应该能够调用 URL、登录并返回一堆 XML,即 CMIS 服务描述符。相反,如果您得到一个充满 HTML 的面向用户的页面,则说明您使用了错误的 URL。

    例如,在 Alfresco 中,用户登录到 /share,但 AtomPub 绑定在 /alfresco/cmisatom。

    【讨论】:

      【解决方案2】:

      是的,AtomPubUrl 是错误的。

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

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

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

      不知何故,它令人困惑,但它的工作原理:) dotCMIS 真的很好。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2015-12-08
        • 1970-01-01
        • 2018-04-22
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多