0

OK I have created a SAML Implementation using wsFederationHttpBinding but I do not want to encrypt the soap:Body.

As Specified here http://msdn.microsoft.com/en-us/library/system.servicemodel.wsfederationhttpsecuritymode.aspx

it says the "Message Security Mode" will,

By default, the body is encrypted and signed.

How can you turn off the encryption of the Body?

John Hartsock
  • 85,422
  • 23
  • 131
  • 146

2 Answers2

0

You need to create a custom Binding.

http://msdn.microsoft.com/en-us/library/ms731827

Colin Smith
  • 12,375
  • 4
  • 39
  • 47
0

Actually I found an easier way than creating a custom Binding

[System.ServiceModel.ServiceContractAttribute(ConfigurationName="Service.IService",
ProtectionLevel= System.Net.Security.ProtectionLevel.Sign)]

The Protection Level of the Service can tell the wsFederatedHttpBinding weather or not to Sign and Encrypt or just Sign the message.

John Hartsock
  • 85,422
  • 23
  • 131
  • 146