我想用https端点启用我的wcf服务。但我只获得http地址,即使我将安全模式设置为传输。还有什么我应该改变/添加才能使这个工作?非常感谢
编辑:我在IIS 6上,这是来自服务器的安全绑定信息。
ServerBindings : (LIST) (1 Items)
"10.1.0.195:80:hw.hello.com"
SecureBindings : (LIST) (2 Items)
"10.1.0.195:443:hw.hello.com"
"81.212.201.9:443:"
<wsdl:service name="HW">
<wsdl:port name="webBinding_IHWMerkezWS" binding="tns:webBinding_IHWMerkezWS">
<soap12:address location="http://hw.world.com/HWPostBox/services/HW.asmx" />
<wsa10:EndpointReference>
<wsa10:Address>http://hw.world.com/HWPostBox/services/HW.asmx</wsa10:Address>
<Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity">
<Dns>localhost</Dns>
</Identity>
</wsa10:EndpointReference>
</wsdl:port>
</wsdl:service>
<wsHttpBinding>
<binding name="webBinding">
<security mode="Transport">
<transport clientCredentialType="None" proxyCredentialType="None" realm=""></transport>
<message clientCredentialType="Certificate" algorithmSuite="Default" />
</security>
</binding>
</wsHttpBinding>
</bindings>
<services>
<service name="HWPostBox.HW" behaviorConfiguration="HWPostBox.HWBehavior">
<!-- Service Endpoints -->
<endpoint address="" binding="wsHttpBinding" bindingName="webBinding" contract="CRLHW.HWWS.IHWMerkezWS">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="HWPostBox.HWBehavior">
<!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpsGetEnabled="true" httpGetEnabled="false"/>
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
答案 0 :(得分:1)
解决:我必须将bindingName属性更改为bindingConfiguration。
<endpoint address="" binding="wsHttpBinding" bindingConfiguration="webBinding"...>
</endpoint>
非常感谢。