0

We are using AJAX Cascading dropdown and AutoComplete functionality with Restful WebService Services providing data. With one endpoint(non-secured) eveything was working fine, until we tried same web page with https. Our Webappplication needs to support both. Our of very few articiles/blogs on this issue I found 2 which applies to my requirements.

  1. http://blog.abstractlabs.net/2009/02/ajax-wcf-services-and-httphttps.html
  2. http://www.mydotnetworld.com/post/2008/10/18/Use-a-WCF-Service-with-HTTP-and-HTTPS-in-C.aspx

I followed same pattern, added 2 endpoints, assuming WCF will pickup appropriate endpoint looking at HTTP or HTTPS protocol. Worked like a charm in my dev machine(XP-IIS5) and 1 Server 2003R2(IIS6), however did work in Production server 2003-IIS6. Website in IIS is exact same(including permission etc). The error it throws - Error 500(Could not find a base address that matches scheme https for the endpoint with binding WebHttpBinding. Registered base address schemes are [http]..)

Here's the sample configuration(ignore typos)

<system.serviceModel>
    <bindings>
      <webHttpBinding>
        <binding name="SecureBinding">
          <security mode="Transport"/>
        </binding>
      </webHttpBinding>
    </bindings>
    <behaviors>
      <endpointBehaviors>
        <behavior name="SearchServiceAspNetAjaxBehavior">
          <enableWebScript />
        </behavior>
      </endpointBehaviors>
    </behaviors>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
    <services>
      <service name="SearchService">
        <endpoint address="" behaviorConfiguration="SearchServiceAspNetAjaxBehavior"
            binding="webHttpBinding" contract="SearchServiceContract" />
       <endpoint address="" behaviorConfiguration="SearchServiceAspNetAjaxBehavior"
            binding="webHttpBinding" bindingConfiguration="SecureBinding" contract="SearchServiceContract" />
      </service>
    </services>
  </system.serviceModel>

Any help on this is highly appreciated ?

Thanks KSS

4

1 回答 1

0

我在我的服务中使用几乎相同的配置,尽管我的端点行为引用<webHttp />而不是<enableWebScript />. 您提到您的服务器是相同的,但无论如何,您是否尝试过在受影响服务器上的其他地方测试 SSL 流量?

于 2010-06-18T00:02:16.720 回答