从 SharePoint Web 部件调用 .NET Web 服务时如何模拟用户?
访问使用 NTLM 身份验证的 Web 服务时,模拟当前 SharePoint 用户的最佳实践是什么? Web 部件有用户名但没有密码,显然,从 Web 部件传递网络凭据不起作用。 远程 Web 服务使用 NTLM 来授权用户。
What is the best practice for impersonating the current SharePoint user when accessing a web service that uses NTLM authentication? The webpart has the user name but not password, and apparently, passing the network credential from the webpart does not work. The remote web service uses NTLM to authorize the user.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果 Web 服务与 SharePoint 位于同一服务器上,并且您使用 NTLM 来访问 SharePoint,那么这可能只是简单的工作。 如果 Web 服务与 SharePoint 位于不同的计算机上,则您需要在两个环境中使用 Kerberos(可以将凭据委托给另一台服务器),或者在通信时必须在 Web 部件中提供用户的完整凭据通过网络服务。 当然,这意味着您必须知道用户的密码。 MOSS 单点登录 (SSO) 功能正好可以用于此目的。
If the web service is on the same server as SharePoint and you are using NTLM to hit SharePoint, then this may just plain work. If the web service is on a different machine than SharePoint then you will either need to be using Kerberos (which can delegate credentials to another server) in both environments or you will have to provide the full credentials of the user within your web part when communicating with the web service. Of course this means that you would have to know the password of the user. The MOSS Single Sign-on (SSO) feature can be used just for this purpose.