我正在尝试通过 wsHttpBinding 实现传输级安全性(使用 Windows 身份验证/凭据)。但我收到以下错误:绑定验证失败,因为 WSHttpBinding 不支持基于传输安全 (HTTPS) 的可靠会话。无法打开通道工厂或服务主机。使用消息安全性通过 HTTP 进行安全可靠的消息传递。
<?xml version="1.0"?>
<configuration>
<appSettings/>
<system.web>
<roleManager enabled="true" />
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
</assemblies>
</compilation>
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/>
</system.web>
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="wsSecure">
<reliableSession enabled="true" />
<security mode="Transport">
<transport proxyCredentialType="Windows" />
</security>
</binding>
</wsHttpBinding>
</bindings>
<services>
<service behaviorConfiguration="ServiceBehavior" name="MyService">
<endpoint address="https://localhost:8000/MyService/" binding="wsHttpBinding" bindingConfiguration="wsSecure"
name="wsBinding" contract="IMyContract" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="ServiceBehavior">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>