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

查看:16
本文介绍了如何使用 Kerberos 身份验证从 c# 客户端调用 Sharepoint 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 的共享点站点上安装它.我们需要对网络服务、调用客户端(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天全站免登陆