wcf-security - 将凭证从一个 wcf 服务传递到另一个 wcf 服务

标签 wcf-security impersonation

我有 2 个 wcf 服务,它们都托管在同一台机器上的 IIS 上。
服务 A 由客户端调用并使用 BasicHttpBinding与运输安全和 NTLM credentialtype .
服务 A 需要调用同样托管在 IIS 上但使用 WsHttpBinding 的服务 B。与运输安全和 NTLM credentialtype .

IIS 配置为使用集成的 Windows 身份验证。

第一次尝试我得到了 403 禁止消息 :

System.ServiceModel.Security.MessageSecurityException : The HTTP request was forbidden with client authentication scheme 'Ntlm'.
System.Net.WebException: The remote server returned an error: (403) Forbidden.

这是正常的,因为当我从服务 A 调用服务 B 时,使用了应用程序池的标识。

在我的第二次尝试中,我试图模拟对服务 B 的调用,但问题是操作中的所有代码都是在调用者帐户下执行的。此帐户在服务器上没有 ACL 权限,不能提供这些权限。
记录了以下错误:
System.IO.FileLoadException : Could not load file or assembly 'System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The handle is invalid. (Exception from HRESULT: 0x80070006 (E_HANDLE))

如何在不更改 ACL 或应用程序池标识的安全性的情况下解决此问题?

最佳答案

关于wcf-security - 将凭证从一个 wcf 服务传递到另一个 wcf 服务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12097488/

相关文章:

wcf - 如何在 IIS 中将 WCF 与 basichttpbinding only、SSL 和 Basic Authentication 一起使用?

wcf - 如何制作X.509证书?

wcf - 如何在 WCF 中拒绝消息?

c# - .NET : Transmit user credentials over the transport layer

asp.net - 如何在模拟 ASP.NET 中使用散列密码

c# - WCF 服务 API 的哈希

WCF 安全 : Difference between TransportWithMessageCredential and Message Security Mode

asp.net - IIS7 模拟无法访问 TFS 存储库

c# - 使用不同的凭据运行 NUnit 集成测试

asp.net - 模拟ASP.NET中的成员资格用户