我希望能够使用http和https
访问该服务在地址“secure”的端点上,如果我包含bindingConfiguration属性,则会收到ServiceActivationException。
但是如果我删除bindingConfiguration =“webBindingSecure”,一切都运行良好。 bindingConfiguration有什么问题?
<system.serviceModel>
<services>
<service name="OperatorApp.Api" behaviorConfiguration="ServiceBehaviour">
<endpoint address="secure" binding="webHttpBinding" **bindingConfiguration="webBindingSecure"** contract="OperatorApp.IApi" behaviorConfiguration="ssl" />
<endpoint address="normal" binding="webHttpBinding" contract="OperatorApp.IApi" behaviorConfiguration="web" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="ServiceBehaviour">
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" >
</serviceMetadata>
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="web">
<webHttp />
</behavior>
<behavior name="ssl">
<webHttp/>
</behavior>
</endpointBehaviors>
</behaviors>
<bindings>
<webHttpBinding>
<binding name="webBindingSecure">
<security mode="Transport">
</security>
</binding>
</webHttpBinding>
</bindings>