Reputation: 7173
I have a web service that receives data in XML. I wish this XML to be encrypted before it is sent and have the serializer handle the decryption. This would let the service methods receive the objects as normal with the encryption detail hidden from them.
I have looked at IOperationBehaviour and inheriting from DataContractSerializerOperationBehavior however I'm finding it hard to find good documentation on how these work and the best way to override/implement them.
Is what I'm trying to do possible? Am I going about it in the right way? Any pointers would be most welcome.
Upvotes: 2
Views: 2195
Reputation: 65461
You could just use wshttpbinding with message encryption (Will not work with REST)
EDIT 1
You can encrypt the transport, which will encrypt the message when it is on the wire. See
http://msdn.microsoft.com/en-us/library/bb924478.aspx
EDIT 2
I agree with John's point below that transport encryption just gives you point-to-point encryption, the message is encrypted on the wire, not through that application layers.
Upvotes: 2