Reputation: 18799
I have a WCF service that has a WSHttpBinding
. Unfortunately in my PCL for some reason I cannot use WSHttpBinding
. I can only use BasicHttpBinding
. Is there a way that I can use a secure binding in a portable class library? I am using Xamarin.
Upvotes: 3
Views: 2252
Reputation: 18799
from Here I read about transport security:
Transport Security
When using transport security, the user credentials and claims are passed by using the transport layer. In other words, user credentials are transport-dependent, which allows fewer authentication options compared to message security. Each transport protocol (TCP, IPC, MSMQ, or HTTP) has its own mechanism for passing credentials and handling message protection. The most common approach for this is to use Secure Sockets Layer (SSL) for encrypting and signing the contents of the packets sent over Secure HTTP (HTTPS). Transport security is used to provide point-to-point security between the two endpoints (service and client). If there are intermediary systems between client and the service, each intermediate point must forward the message over a new SSL connection.
I concluded that a secure binding for PCL would be:
BasicHttpBinding bind= new BasicHttpBinding(BasicHttpSecurityMode.Transport);
Web.config Binding:
<basicHttpBinding>
<binding name="BasicSecure">
<security mode="Transport" />
</binding>
</basicHttpBinding>
Upvotes: 4