验证 Office 365 SharePoint Online OOTB 服务
我想将 SharePoint 数据消费到非 .Net 平台中。为此,我已经使用了 SharePoint OOTB 服务,例如 Lists.asmx、Webs.asmx 和 search.asmx。 我已经使用 Authentication.asmx 成功添加了对基于表单的身份验证的支持。 现在,我想为 Office 365 SharePoint 提供在线支持。为此,我正在开发一个演示 SharePoint Online 网站。 问题,我面临的问题是,当我使用 Authentication.asmx 的模式方法时,我得到“表单”响应:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<ModeResponse xmlns="http://schemas.microsoft.com/sharepoint/soap/">
<ModeResult>Forms</ModeResult>
</ModeResponse>
</soap:Body>
</soap:Envelope>
但是,当我使用 Login.asmx 并传递正确的用户名和密码时,我收到“PasswordNotMatch”错误,相同的凭据工作正常在浏览器中。
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<LoginResponse xmlns="http://schemas.microsoft.com/sharepoint/soap/">
<LoginResult>
<ErrorCode>PasswordNotMatch</ErrorCode>
<TimeoutSeconds>0</TimeoutSeconds>
</LoginResult>
</LoginResponse>
</soap:Body>
</soap:Envelope>
注意:- 这非常适合 FBA 非 Office 365 SharePoint 网站。
有人可以帮助我实现对 Office 365 SharePoint Online OOTB 服务的支持吗?
I want to consume SharePoint data into a non .Net platform. I already use the SharePoint OOTB services like Lists.asmx, Webs.asmx and search.asmx for this purpose.
I have successfully added support for forms based authentication using Authentication.asmx.
Now, I want to provide support for Office 365 SharePoint online. For that purpose I have a demo SharePoint Online site that I am working on.
Problem, I am facing is when I use Mode method of Authentication.asmx I get ‘Forms’ in response:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<ModeResponse xmlns="http://schemas.microsoft.com/sharepoint/soap/">
<ModeResult>Forms</ModeResult>
</ModeResponse>
</soap:Body>
</soap:Envelope>
However when I use Login.asmx and pass correct username and password, I get ‘PasswordNotMatch’ error, the same credentials are working fine in browser.
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<LoginResponse xmlns="http://schemas.microsoft.com/sharepoint/soap/">
<LoginResult>
<ErrorCode>PasswordNotMatch</ErrorCode>
<TimeoutSeconds>0</TimeoutSeconds>
</LoginResult>
</LoginResponse>
</soap:Body>
</soap:Envelope>
Note:- This works perfect for a FBA non Office 365 SharePoint site.
Could somebody please help me in implementing the support for Office 365 SharePoint Online OOTB services?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我一直在研究类似的想法并且这个帖子非常有帮助。他们实际上有一个使用 PInvoke 的 Web 服务示例,它可能会帮助您实现目标。
编辑:我的搜索引导我到Wictor Wilen 的另一篇文章,但目前试图避免使用 ClientOM。
编辑2:好吧,一切顺利。使用上面 Wictor 的代码,我下载了他的示例解决方案,并将“MsOnlineClaimsHelper.cs”和“WcfClientContracts.cs”移动到我的项目中,稍后我将摆弄这些文件中真正使用的内容。我仅更改它们以删除 ClientOM 引用,包括 clientContext_ExecutingWebRequest 方法。
在示例 MVC3 应用程序或控制台应用程序中:
I've been looking into a similar idea and this thread has been extremely helpful. They actually have a webservice sample using the PInvoke, it might help you get there.
Edit: my search led me to this other post by Wictor Wilen, but trying to avoid the ClientOM for now.
Edit2: alright, got this working. Using the code from Wictor above, I downloaded his sample solution and moved "MsOnlineClaimsHelper.cs" and "WcfClientContracts.cs" to my project, I will be fiddling with what is really used from these files later. I only changed them to remove the ClientOM references including the clientContext_ExecutingWebRequest method.
In a sample MVC3 app or Console app: