none
Tcp绑定------安全问题 RRS feed

  • 问题

  • 1、net.tcp绑定的默认传输是否安全呀?

    2、用iis(7.0)寄存wcf是否更安全呀?(比如:net.tcp默认配置中设为None)

    3、如果net.tcp不安全,我用证书来进行验证,我申请了一个证书,在服务端里配置了,如下:

     

    <behaviors>
    			<serviceBehaviors>
    				<behavior name="ServerBehavior">
    					<serviceDebug includeExceptionDetailInFaults="true"/>
    					<serviceMetadata httpGetEnabled="true"/>
    					<serviceCredentials>
    						<serviceCertificate findValue="WcfAbc" storeLocation="CurrentUser" storeName="Root" x509FindType="FindBySubjectName"/>
    						<clientCertificate>
    							<authentication certificateValidationMode="PeerTrust" />
    						</clientCertificate>
    					</serviceCredentials>
    				</behavior>
    			</serviceBehaviors>
    		</behaviors>
    		<bindings>
    			<netTcpBinding>
    				<binding name="TcpBindingConfig">
    					<security mode="Message">
    						<message clientCredentialType="Certificate" />
    					</security>
    				</binding>
    			</netTcpBinding>
    		</bindings>
    

     

    客户端:

     

    <behaviors>
            <endpointBehaviors>
              <behavior name="ServerBehavior">
                <clientCredentials>
                  <clientCertificate findValue="WcfABC" x509FindType="FindBySubjectName" storeLocation="CurrentUser" storeName="Root"/>
                  <serviceCertificate>
                    <authentication certificateValidationMode="PeerTrust"/>
                  </serviceCertificate>
                </clientCredentials>
              </behavior>
            </endpointBehaviors>
          </behaviors>
    

    这样进行,报错      ---------------调用方未由服务进行身份验证。

     


    认真学习,不耻下问.^_^
    2011年11月14日 8:49

答案