tags:

views:

19

answers:

1

Hi,

I'm creating a simple web service using WCF. The message needs to be encrypted and the user need to be authenticated through an asp.net provider. What binding should I use for this? WsHttpBinding or WebHttpBinding?

Can anybody point me to a good example using the asp.net provider and self signed certificates with wcf.

Thanks

A: 

You say that the message needs to be encrypted, but don't specify whether you have a specific requirement for message-level encryption or if transport encryption might be enough.

If you transport-level encryption is enough, then BasicHttpBinding + SSL would work.

Otherwise, you'd use WSHttpBinding and configure message-level encryption. Of course, the decision might also be tied to the capabilities of any clients you want to consume the service.

You also mention WebHttpBinding, but that's used only for REST-style services. Is your service REST style? If so, then your only option would be SSL and using transport-level authentication, I think.

tomasr