• WCF去掉证书验证(转载)


    修改服务器端配置文件
    <system.serviceModel>
    <!--添加服务-->
         <services>
           <!--name 必须与代码中的host实例初始化的服务一样 behaviorConfiguration 行为配置 -->
           <service name="DRP_BaseData.ServiceBaseData" behaviorConfiguration="BaseDataServerBehavior">
            ......
           <!--添加契约接口    contract="WcfDemo.IService1" WcfDemo.IService1为契约接口    binding="wsHttpBinding" wsHttpBinding为通过Http调用-->
           <endpoint binding="wsHttpBinding" contract="DRP_BaseData.IServiceBaseData" bindingConfiguration="ServerBinding" >  
            </endpoint>
           </service>


         <behaviors>
    ......
         <behaviors>


          <bindings>
           <wsHttpBinding>
          ......
             <binding name="ServerBinding">
                <security mode="None"/>
             </binding>
           </wsHttpBinding>
         </bindings>  

         
    </system.serviceModel>


    修改服务器端配置文件
    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
         <configSections>
              ......
         </configSections>
         <applicationSettings>
              ......
         </applicationSettings>
         <system.serviceModel>
             <bindings>
                 <wsHttpBinding>
                     <binding name="WSHttpBinding_IServiceTransactionData" closeTimeout="00:03:00"
                         openTimeout="00:05:00" receiveTimeout="00:10:00" sendTimeout="00:05:00"
                         bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
                         maxBufferPoolSize="6242880" maxReceivedMessageSize="6553600"
                         messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
                         allowCookies="false">
                         <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                             maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                         <reliableSession ordered="true" inactivityTimeout="00:10:00"
                             enabled="false" />
                         <security mode="None" /> <!--主要是将此改改为 None-->
                     </binding>
                    
                 </wsHttpBinding>
             </bindings>
             <client>
    ......           
             </client>
         </system.serviceModel>
    </configuration>

  • 相关阅读:
    做成像的你不得不了解的真相9-相机制冷温度越低越好么?
    做成像的你不得不了解的真相8-如影随形的噪声(下)
    做成像的你不得不了解的真相8-如影随形的噪声(中)
    做成像的你不能不了解的真相8-如影随形的噪声(上)
    做成像的你不能不了解的真相7-两分钟测算相机增益(Gain)
    做成像的你不能不了解的真相6-分辨率(2)
    做成像的你不能不了解的真相6-分辨率(1)
    做成像的你不能不了解的真相5-图像信噪比计算
    做成像的你不能不了解的真相4-灰度值与电子数
    做成像的你不能不了解的真相3-信噪比2
  • 原文地址:https://www.cnblogs.com/sojastudio/p/2697155.html
Copyright © 2020-2023  润新知