WCF禁用安全配置指導手冊
作者:佚名
WCF禁用安全配置對于初學者來說可能遇到的次數并不是太多,所以對此不太了解。通過這篇文章介紹的內容,大家應該可以初步掌握這一技巧。
WCF中具有安全配置。不過,在實際使用中我們有時會碰到需要關閉這一安全配置的環境。今天我們就來為大家介紹一下有關WCF禁用安全配置的相關知識。#t#
時不時會用到這個WCF禁用安全配置方法,寫在這里,以免忘記了又滿天找。
- < ?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禁用安全配置相關技巧講解。
責任編輯:曹凱
來源:
博客園