WCF测试客户端中的https使用basicHttpBinding绑定

时间:2012-07-17 03:08:21

标签: wcf web-services service https client

我需要知道需要对以下web.config进行哪些更改才能显示在WCF测试客户端中。我希望看到一个调用ssl,https协议的web.config。我希望应用程序显示在WCF测试客户端中,而不会出现元数据错误。顺便说一句,我尝试了mexHttpsBinding并摆脱了httpGetEnabled =“False”。都没有奏效。我也尝试过创建一个https端点 - 没有快乐。

<compilation debug="true" targetFramework="4.0" />

<services>

  <service name="WcfService1_ssl.Service1" behaviorConfiguration="OhBehave">

    <endpoint address="" binding="basicHttpBinding" contract="WcfService1_ssl.IService1" bindingConfiguration="secureBinding" />

    <!-- VERIFY:  Verify address="mex" section is commented or deleted to avoid any mexHttpBinding. -->

    <endpoint address="mex"   binding="mexHttpBinding" contract="IMetadataExchange" />

  </service>

</services>

<behaviors>

  <serviceBehaviors>

    <behavior name="OhBehave">

      <dataContractSerializer maxItemsInObjectGraph="2147483646" />

      <serviceMetadata httpGetEnabled="False"  httpsGetEnabled="True" />

      <serviceDebug includeExceptionDetailInFaults="true" />

    </behavior>

  </serviceBehaviors>

</behaviors>

<bindings>

  <basicHttpBinding>

    <clear />

    <binding name="secureBinding" closeTimeout="10:00:00" openTimeout="10:00:00" receiveTimeout="10:10:00" sendTimeout="10:10:00" bypassProxyOnLocal="false"

             hostNameComparisonMode="StrongWildcard" maxBufferSize="2147483647"

             maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" messageEncoding="Text">

      <readerQuotas maxStringContentLength="2147483647" />

      <security mode="Transport">

        <transport clientCredentialType="None"></transport>

      </security>

    </binding>

  </basicHttpBinding>

</bindings>

<serviceHostingEnvironment multipleSiteBindingsEnabled="true"  aspNetCompatibilityEnabled="true" />

<modules runAllManagedModulesForAllRequests="true"/>

1 个答案:

答案 0 :(得分:2)

您可以使用soapUI测试https,不要认为wcf测试客户端支持https