【发布时间】:2011-09-08 11:46:43
【问题描述】:
我是 Sharepoint/MS 开发人员,对 Livelink 不太熟悉。无论如何,我看到他们有一个 .NET WCF 服务。我正在尝试使用此 Web 服务进行身份验证,据我所知,API 文档应该不会太难。
根据文档,我最初需要使用我所做的管理员用户进行身份验证,这工作正常。然后我可以使用当前登录的用户来模拟。
一切正常,直到我到达 ImpersonateUser 部分,该部分以非常通用的“执行此操作的权限不足”而失败。错误。这是客户端的问题吗?还是LL侧?可能没有正确设置或根本没有设置 Kerberos?
附上代码:
private string ImpersonateUser(string adminToken)
{
string userToken = string.Empty;
llAuthentication.OTAuthentication fLLAuthentication = new llAuthentication.OTAuthentication();
fLLAuthentication.AuthenticationToken = adminToken;
fAuthServiceUser = new AuthenticationClient();
fAuthServiceUser.Endpoint.Address = new EndpointAddress(this.ServiceRoot + "Authentication.svc");
fAuthServiceUser.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation;
userToken = fAuthServiceUser.ImpersonateUser(fLLAuthentication, WindowsIdentity.GetCurrent().Name.ToString());
return userToken;
}
【问题讨论】:
-
x0n 是对的。请注意:如果您正在集成 SP 和 LL,您可以查看 Open Text 的用于 SharePoint 的产品 AGA(应用程序治理和存档)。它有一个 SDK 供开发人员从 SP 访问 LL。您可能会发现那里实现了一些复杂的场景,因此您无需使用 WS 从头开始对其进行编程。
标签: asp.net wcf-security kerberos opentext