如何使用Kerberos身份验证从c#客户端调用Sharepoint Web服务? [英] How do I call a Sharepoint Webservice from a c# client using Kerberos authentication?

查看:270
本文介绍了如何使用Kerberos身份验证从c#客户端调用Sharepoint Web服务?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们已经开发了一个Web服务,该Web服务可以在共享点站点的环境中运行.使用普通的Windows身份验证可以正常工作.

We have developed a webservice that sits and runs in the context of a sharepoint site. This works fine using normal windows authentication.

我们现在有一个客户端,希望将此客户端安装在启用Kerberos的共享点站点上.要启用此功能,我们需要对Web服务,调用客户端(Windows服务)或两者进行哪些更改??

We now have a client who wants to install this on a Kerberos enabled sharepoint site. What changes would we need to make to either the webserivce, the calling client (a windows service) or both to enable this...?

推荐答案

这是在Intranet中吗?

Is this in an intranet?

如果是这样,并且您的客户端已经将Windows凭据传递到Web服务,则您不必做任何其他工作.

If so, and your client is already passing windows credentials to the web service, you shouldn't have to do any additional work.

如果您不通过Windows凭据,请按以下步骤操作:

If you aren't passing windows credentials, here is how to do it :

WebServiceProxy proxy = new WebServiceProxy(); // Derived from SoapHttpClientProtocol

proxy.Credentials = CredentialCache.DefaultCredentials;

此方法适用于NTLM和Kerberos身份验证.它将通过运行代码的Windows帐户的凭据.

This method works for both NTLM and Kerberos authentication. It will pass the credentials of the windows account under which the code is running.

这篇关于如何使用Kerberos身份验证从c#客户端调用Sharepoint Web服务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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