如何使用Kerberos身份验证从ac#客户端调用Sharepoint Webservice?(How do I call a Sharepoint Webservice from a c# clie

编程入门 行业动态 更新时间:2024-10-27 22:19:48
如何使用Kerberos身份验证从ac#客户端调用Sharepoint Webservice?(How do I call a Sharepoint Webservice from a c# client using Kerberos authentication?)

我们开发了一个在sharepoint站点环境中运行的Web服务。 使用普通的Windows身份验证可以正常工作

我们现在有一个客户端想要在启用Kerberos的sharepoint站点上安装它。 我们需要对webserivce,调用客户端(Windows服务)或两者进行哪些更改才能启用此功能?

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

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...?

最满意答案

这是在内联网吗?

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

如果您没有传递Windows凭据,请按以下步骤操作:

WebServiceProxy proxy = new WebServiceProxy(); // Derived from SoapHttpClientProtocol proxy.Credentials = CredentialCache.DefaultCredentials;

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

Is this in an intranet?

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

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

WebServiceProxy proxy = new WebServiceProxy(); // Derived from SoapHttpClientProtocol proxy.Credentials = CredentialCache.DefaultCredentials;

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

更多推荐

sharepoint,webserivce,启用,We,电脑培训,计算机培训,IT培训"/> <meta name="d

本文发布于:2023-07-24 10:58:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1245058.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如何使用   身份验证   客户端   client   Kerberos

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!