5

我有 2 个 wcf 服务都托管在同一台机器上的 IIS 上。服务 A 由客户端调用并BasicHttpBinding与传输安全性和NTLM credentialtype. 服务 A 需要调用同样托管在 IIS 上的服务 B,但使用WsHttpBinding传输安全性和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 或应用程序池标识的安全性的情况下解决此问题?

4