WCF禁用安全配置指導(dǎo)手冊(cè)
作者:佚名
WCF禁用安全配置對(duì)于初學(xué)者來(lái)說(shuō)可能遇到的次數(shù)并不是太多,所以對(duì)此不太了解。通過(guò)這篇文章介紹的內(nèi)容,大家應(yīng)該可以初步掌握這一技巧。
WCF中具有安全配置。不過(guò),在實(shí)際使用中我們有時(shí)會(huì)碰到需要關(guān)閉這一安全配置的環(huán)境。今天我們就來(lái)為大家介紹一下有關(guān)WCF禁用安全配置的相關(guān)知識(shí)。#t#
時(shí)不時(shí)會(huì)用到這個(gè)WCF禁用安全配置方法,寫(xiě)在這里,以免忘記了又滿(mǎn)天找。
- < ?xml version="1.0" encoding="utf-8" ?>
- < configuration>
- < system.web>
- < compilation debug="true" />
- < /system.web>
- < system.serviceModel>
- < services>
- < service name="CertificateTest
.Service.CalService" - behaviorConfiguration="CalServiceBeConfig">
- < host>
- < baseAddresses>
- < add baseAddress = "http://localhost:8888/" />
- < /baseAddresses>
- < /host>
- < !--指定endpoint的bindingConfiguration屬性-->
- < endpoint address ="CalService"
- binding="wsHttpBinding"
- contract="CertificateTest.
Contract.ICalService" - bindingConfiguration="noSecBinding">
- < identity>
- < /identity>
- < /endpoint>
- < /service>
- < /services>
- < behaviors>
- < serviceBehaviors>
- < behavior name="CalServiceBeConfig" >
- < serviceMetadata httpGetEnabled="True"/>
- < serviceDebug includeException
DetailInFaults="False" /> - < /behavior>
- < /serviceBehaviors>
- < /behaviors>
- < !--在binding這里禁用安全性-->
- < bindings>
- < wsHttpBinding>
- < binding name="noSecBinding">
- < security mode="None">< /security>
- < /binding>
- < /wsHttpBinding>
- < /bindings>
- < /system.serviceModel>
- < /configuration>
以上就是WCF禁用安全配置相關(guān)技巧講解。
責(zé)任編輯:曹凱
來(lái)源:
博客園