如何验证 SharePoint 用户凭据 [英] How can I authenticate SharePoint user credentials

查看:23
本文介绍了如何验证 SharePoint 用户凭据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要从我的桌面应用程序(用 C# 编写)访问一个 sharepoint 应用程序.我应该如何传递凭据并验证身份验证?

I need to access a sharepoint application from my desktop application (written in C#). How should I pass credentials and verify authentication?

推荐答案

1.Add WebService reference(Name : SourceLists) to the project (Web service URL https://……./sites/_vti_bin/lists.asmx)2. SourceLists.Lists sourceListService = new SourceLists.Lists();

1.Add WebService reference(Name : SourceLists) to the project (Web service URL https://……./sites/_vti_bin/lists.asmx) 2. SourceLists.Lists sourceListService = new SourceLists.Lists();

System.Net.NetworkCredential networkCredentials = new System.Net.NetworkCredential(userid", pwd");

System.Net.NetworkCredential networkCredentials = new System.Net.NetworkCredential("userid", "pwd");

sourceListService.Credentials = networkCredentials;

sourceListService.Credentials = networkCredentials;

这篇关于如何验证 SharePoint 用户凭据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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