Safely Linking WCF in Portable Class Library with Xamarin

I have a WCF service with 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 secure linking in a portable class library? I am using Xamarin.

+3


source to share


1 answer


from Here I read about transport security:

Transport security

When using transport security, user credentials and claims are transmitted using the transport layer. In other words, the user's credentials are transport-specific, which allows for authentication options versus message security. Each transport protocol (TCP, IPC, MSMQ, or HTTP) has its own mechanism for passing credentials and handling messages. The most common approach for this is to use Secure Sockets Layer (SSL) to encrypt and sign the contents of packets sent over Secure HTTP (HTTPS). Transport security is used to provide point-to-point security between two endpoints (service and customer). If there are intermediary systems between the customer and the service,each waypoint must forward the message over a new SSL connection.

I concluded that PCL- safe binding would be:



 BasicHttpBinding bind= new BasicHttpBinding(BasicHttpSecurityMode.Transport);

      

binding Web.config:

  <basicHttpBinding>
    <binding name="BasicSecure">
      <security mode="Transport" />
    </binding>
  </basicHttpBinding>

      

+4


source







All Articles