A.makecert -sr localmachine -ss My -n CN=TopupProxyServer -sky exchange -pe -r B.检索证书的指纹 ,证书名TopupProxyServer C.设置 wsHttpBinding.binding的security mode为TransportWithMessageCredential;clientCredentialType为UserName

<binding name="WSHttpBinding_ITerminalHandler" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="12000000" maxReceivedMessageSize="12000000" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="false" allowCookies="false">      <readerQuotas maxDepth="32" maxStringContentLength="12000000" maxArrayLength="12000000" maxBytesPerRead="4096" maxNameTableCharCount="16384" />      <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" />      <security mode="TransportWithMessageCredential">       <!--<transport clientCredentialType="None" />-->       <message clientCredentialType="UserName" />      </security>     </binding>

D.设置<services>下的 service的binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_ITerminalHandler",注意如果是https的话, 那么<endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange"/>里面的binding应该是"mexHttpsBinding"

<service behaviorConfiguration="ACS.AFC.DeferredTopup.Proxy.TerminalHandlerBehavior"     name="ACS.AFC.DeferredTopup.Proxy.TerminalHandler">         <endpoint address="" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_ITerminalHandler"      contract="ACS.AFC.DeferredTopup.Proxy.ITerminalHandler">      <identity>       <dns value="localhost" />      </identity>     </endpoint>     <endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange"/>      <host>       <baseAddresses>        <add baseAddress="https://localhost:444/"/>       </baseAddresses>      </host>         </service>

E.设置behavior 注意<serviceMetadata httpsGetEnabled="true" />里面使用的是httpsGetEnabled

<behavior name="ACS.AFC.DeferredTopup.Proxy.TerminalHandlerBehavior">      <serviceAuthorization principalPermissionMode="Custom">       <authorizationPolicies>        <add policyType="ACS.AFC.HostSecurityModule.AuthorizationPolicy, ACS.AFC.HostSecurityModule" />       </authorizationPolicies>      </serviceAuthorization>      <serviceThrottling maxConcurrentCalls="200" maxConcurrentSessions="200"       maxConcurrentInstances="200" />      <serviceMetadata httpsGetEnabled="true" />      <serviceDebug includeExceptionDetailInFaults="true" />      <serviceCredentials>       <clientCertificate>        <authentication certificateValidationMode="None" />       </clientCertificate>       <serviceCertificate findValue="TopupProxyServer" storeLocation="LocalMachine"        x509FindType="FindBySubjectName" />       <userNameAuthentication userNamePasswordValidationMode="Custom"        customUserNamePasswordValidatorType="ACS.AFC.HostSecurityModule.CustomUsernamePasswordValidator,ACS.AFC.HostSecurityModule" />      </serviceCredentials>     </behavior>

wcf使用ssl连接方式设置的更多相关文章

  1. java修改AD域用户密码使用SSL连接方式

    正常情况下,JAVA修改AD域用户属性,只能修改一些普通属性, 如果要修改AD域用户密码和userAccountControl属性就得使用SSL连接的方式修改, SSL连接的方式需要操作以下步骤: 1 ...

  2. window7 输入什么命令可以快速打开服务管理?? 虚拟机设置了NAT网络连接方式,还是无法上网?

    window7 输入什么命令可以快速打开服务管理?? 虚拟机设置了NAT网络连接方式,还是无法上网? 1.我遇到的问题? 在虚拟机安装了linux系统,并且把网络连接方式设置为NAT,如图: 意思就是 ...

  3. Mysql 中的SSL 连接

    Mysql 中的SSL 连接 以下来自网络参考和自己测试整理,没有查找相关资料.若有错误之处,欢迎指正. 当前的Mysql 客户端版本基本都不太能支持 caching_sha2_password 认证 ...

  4. Android 设置VPN(pptp连接方式)

    本教程以小米手机的MIUI系统为例子,教大家如何设置VPN 先找到“设置”,打开设置菜单,如下图: 在设置菜单里面找“其它连接方式” 然后找到“VPN”,点击进入: 进入VPN设置界面后,如果VPN未 ...

  5. AD19如何单独设置单个焊盘与铜皮的连接方式

    我们用过Altium Designer做设计的人都知道,Altium中有个强大的规则管理器,由于功能太多这里就先不介绍,有需要可以留言,今天的主题是讲解AD19的新功能,快速给单个焊盘设置与铜皮的连接 ...

  6. SpringBoot设置mysql的ssl连接

    因工作需要,mysql连接需要开启ssl认证,本文主要讲述客户端如何配置ssl连接. 开发环境信息: SpringBoot: 2.0.5.RELEASE mysql-connector-java: 8 ...

  7. SSL Pining Mode 设置iOS SSL 连接安全

    一:SSL Ping Mode 使用SSL来进行网络通信成为了很多mobile app的默认选择.最近一些文章发现:一些app并没有采用“额外的措施”来保证窃听不可以发生:这个“额外的步骤“就是SSL ...

  8. Android4种网络连接方式HttpClient、HttpURLConnection、OKHttp和Volley优缺点和性能对比

    比较的指标: 1.cpu 2.流量 3.电量 4.内存占用 5.联网时间 功能点: 1.重试机制 2.提供的扩展功能 3.易用性 4.是否https 5.是否支持reflect api,OkHttp有 ...

  9. MySQL Connector/ODBC 2.50 (MyODBC 2.50)连接方式

    一.MySQL Connector/ODBC 2.50 (MyODBC 2.50)连接方式 1.本地数据库连接Driver={MySQL};Server=localhost;Option=16834; ...

随机推荐

  1. 安卓工程中定义的app_name等报错解决办法 工程上有叹号

    类似于"app_name" is not translated in af, am, ar, be, bg, ca, cs, da, de, el, en-rGB, es, es- ...

  2. 按键精灵http.定义getWeb

    Function 取网页源码(URL) Set objXML=CreateObject("Microsoft.XMLHTTP") objXML.Open "Get&quo ...

  3. c#发送http请求注意

    这里要注意几个点:第一就是编码,如果编码不对,容易中文乱码第二就是ContentType 如果设置不对,有可能连方法都调试不进去(我api用的是MVC的普通controller)第三就是paramDa ...

  4. ABAP字符串操作 截取字符长度 取位数

    ABAP字符串操作   ABAP對字串的操作方法與其他語言的操作有較大差別,以下是較常用的對字串操作的方法: 1. 字串的連接:CONCATENATEDATA: t1 TYPE c LENGTH 10 ...

  5. react总结

    在我的工作用到的最多就是backbone,其次还会有ember/Ext,backbone目前能实现我们team所需要实现的功能,因为我们的component不需要频繁的操作Dom,当后台API返回数据 ...

  6. python远程批量执行命令

    #!/usr/bin/env python#-*- coding:utf-8 -*- from multiprocessing import Process,Poolimport time,param ...

  7. [转] Android root 原理

    欢迎转载,转载请注明出处:http://www.cnblogs.com/lanrenxinxin/p/5572640.html 0x00 关于root linux和类Unix系统的最初设计都是针对多用 ...

  8. HeartBeat源码安装

    只是写了安装流程,具体信息查看互联网; 环境: CentOS6.8 x86_64 min Heartbeat 3.0.6 http://hg.linux-ha.org/heartbeat-STABLE ...

  9. 常用Oracle分析函数详解 [http://www.cnblogs.com/benio/archive/2011/06/01/2066106.html]

      学习步骤:1. 拥有Oracle EBS demo 环境 或者 PROD 环境2. copy以下代码进 PL/SQL3. 配合解释分析结果4. 如果网页有点乱请复制到TXT中查看 /*假设一个经理 ...

  10. Rx学习

    RXjava学习资料: https://www.gitbook.com/book/yuxingxin/rxjava-essentials-cn/details 如下只是学习笔记而已,后面添加实战案例, ...