我如何可以验证SharePoint用户凭据 [英] How can I authenticate SharePoint user credentials
问题描述
我需要从我的桌面应用程序(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.新增WebService的参考?(名称:SourceLists)到项目(Web服务URL的https://......./sites/_vti_bin/lists.asmx)
2. SourceLists.Lists sourceListService =新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 =新System.Net.NetworkCredential(用户id,PWD);
System.Net.NetworkCredential networkCredentials = new System.Net.NetworkCredential("userid", "pwd");
sourceListService.Credentials = networkCredentials;
sourceListService.Credentials = networkCredentials;
这篇关于我如何可以验证SharePoint用户凭据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!