安全WCF在便携式类库与Xamarin结合 [英] Secure WCF binding in a Portable class library with Xamarin

查看:845
本文介绍了安全WCF在便携式类库与Xamarin结合的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有,有一个的WSHttpBinding WCF服务。不幸的是在我的PCL出于某种原因,我不能使用的WSHttpBinding 。我只能用 basicHttpBinding的。有没有我可以使用一个安全的结合在便携式类库的方法吗?我使用Xamarin。

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.

推荐答案

我读到的运输保障:

from Here I read about transport security:

交通运输安全

在使用传输的安全性,用户凭据
  和权利要求中,通过使用传输层通过。换一种说法,
  用户凭据运输相关的,它允许较少
  相比于信息安全认证选项。每个传输
  协议(TCP,IPC,MSMQ,或HTTP)都有自己的传递机制
  凭据和处理信息的保护。最常用的方法
  这是使用安全套接字层(SSL)加密和
  签约发送的安全HTTP数据包的内容(HTTPS)。
  传输安全用于提供间点对点的安全
  两个端点(服务和客户端)。如果有中间
  客户端和服务,每一个中间点之间必须系统
  转发邮件了一个新的SSL连接。

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.

我的结论是一个安全的绑定作为PCL将是:

I concluded that a secure binding for PCL would be:

 BasicHttpBinding bind= new BasicHttpBinding(BasicHttpSecurityMode.Transport);

的Web.config绑定:

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

这篇关于安全WCF在便携式类库与Xamarin结合的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆