0

我是 Sharepoint/MS 开发人员,对 Livelink 不太熟悉。无论如何,我看到他们有一个 .NET WCF 服务。我正在尝试使用此 Web 服务进行身份验证,据我可以从 API 文档中读取,这应该不会太难。

根据文档,我最初需要使用我所做的管理员用户进行身份验证,这工作正常。然后我可以使用当前登录的用户来模拟。

一切正常,直到我到达 ImpersonateUser 部分,该部分以非常通用的“执行此操作的权限不足”而失败。错误。这是客户端的问题吗?还是LL侧?可能的 Kerberos 没有正确设置或根本没有设置?

Herwith代码:

 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;
}
4

1 回答 1

2

这与 Windows 身份验证无关。这只是意味着您最初用于登录的 livelink 用户无权冒充其他 livelink 用户。请您的 livelink 管理员授予此权利(我不知道确切的权利,抱歉)

于 2012-02-08T14:48:53.487 回答