【发布时间】:2010-12-17 19:46:37
【问题描述】:
我正在尝试使用 ProtectionLevel 属性在 WCF Web 服务上设置安全性:
[ServiceContract(ProtectionLevel= ProtectionLevel.EncryptAndSign)]
这可以编译,但是当我尝试在另一个项目中更新服务引用时,Visual Studio 会引发异常(相同的解决方案)。
System.InvalidOperationException: 请求消息必须受到保护。 这是一个操作所需要的 合同 ('IStorageService','tempuri.org/';)。 保护必须由 捆绑 ('WSHttpBinding','tempuri.org/';)。
我还需要设置什么才能使其正常工作?
【问题讨论】:
-
System.InvalidOperationException:请求消息必须受到保护。这是合约操作所必需的 ('IStorageService','tempuri.org/')。保护必须由绑定提供('WSHttpBinding','tempuri.org/')。
标签: wcf web-services