WCF禁用安全配置相關(guān)代碼剖析
作者:佚名
WCF禁用安全配置在實際編程中是一個比較常用到的操作技術(shù)。在這里我們就為大家總結(jié)了一下它的使用方法,方便大家使用。
在使用了WCF這樣一款開發(fā)工具之后,我們會發(fā)現(xiàn),它在安全性方面發(fā)揮了非常大的作用。不過在一定的環(huán)境中,我們又需要禁用安全性配置,那么這時我們應(yīng)該如何操作呢?在這里就一起來了解一下WCF禁用安全配置的相關(guān)方法吧。
WCF禁用安全配置具體實現(xià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 includeExceptionDetailInFaults="False" />
- < /behavior>
- < /serviceBehaviors>
- < /behaviors>
- < !--在binding這里禁用安全性-->
- < bindings>
- < wsHttpBinding>
- < binding name="noSecBinding">
- < security mode="None">< /security>
- < /binding>
- < /wsHttpBinding>
- < /bindings>
- < /system.serviceModel>
- < /configuration>
以上就是我們?yōu)榇蠹医榻B的WCF禁用安全配置相關(guān)內(nèi)容。
【編輯推薦】
責(zé)任編輯:曹凱
來源:
博客園