标签:
1.在配置文件,app.config中添加一个节点
<behaviors> <endpointBehaviors > <behavior name ="MyBehavior"> <enableWebScript/> < behavior> <endpointBehaviors>
2. 添加endpoint的绑定
<endpoint address="http://localhost:9418/CaculatorService" binding="webHttpBinding" bindingConfiguration="" contract="Contracts.ICalculator" behaviorConfiguration ="MyBehavior"/>
绑定必须为webHttpBinding
标签:
原文地址:http://www.cnblogs.com/lxdonge/p/4260757.html