是否可以仅使用BasicHttpBinding绑定在IIS中使用SSL和基本身份验证设置WCF服务?(我不能使用wsHttpBinding绑定)
该站点托管在IIS 7上,并设置了以下身份验证:
- Anonymous access: off
- Basic authentication: on
- Integrated Windows authentication: off !!
Run Code Online (Sandbox Code Playgroud)
服务配置:
<services>
<service name="NameSpace.SomeService">
<host>
<baseAddresses>
<add baseAddress="https://hostname/SomeService/" />
</baseAddresses>
</host>
<!-- Service Endpoints -->
<endpoint address="" binding="basicHttpBinding"
bindingNamespace="http://hostname/SomeMethodName/1"
contract="NameSpace.ISomeInterfaceService"
name="Default"
/>
<endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpsGetEnabled="true"/>
<!-- To receive exception details in faults for debugging …Run Code Online (Sandbox Code Playgroud)