我正在尝试使用ProtectionLevel属性在WCF Web服务上设置安全性:
[ServiceContract(ProtectionLevel= ProtectionLevel.EncryptAndSign)]
Run Code Online (Sandbox Code Playgroud)
这会编译,但当我尝试更新另一个项目(同一解决方案)中的服务引用时,Visual Studio会抛出异常.
System.InvalidOperationException:必须保护请求消息.这是合同操作所必需的('IStorageService','tempuri.org/';).保护必须由绑定提供('WSHttpBinding','tempuri.org/';).
我还需要设置什么来实现这一目标?