This is a migrated thread and some comments may be shown as answers.

RadComboBox Load on Demand (WCF Web Service) with https

2 Answers 106 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Jagat
Top achievements
Rank 1
Jagat asked on 19 May 2014, 08:05 PM
I've implemented RadComboBox Load on Demand functionality using the WCF Web Service. This service works fine with the http configuration settings. We now want to make our application secure (https). Please see the  web.config settings and the error message below. 

Web.config Settings:

<system.serviceModel>
            <behaviors>
<serviceBehaviors>
<behavior>
<serviceMetadata httpsGetEnabled="true" httpsGetUrl="" />
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
                  <endpointBehaviors>
                        <behavior name="MyProject.WCFClientsAspNetAjaxBehavior">
                              <enableWebScript/>
                        </behavior>
                  </endpointBehaviors>
            </behaviors>
            <serviceHostingEnvironment aspNetCompatibilityEnabled="true">
                  <baseAddressPrefixFilters> 
                                <add prefix="https://www.MySite.com"/>
                </baseAddressPrefixFilters>
            </serviceHostingEnvironment>
            <services>
                  <service name="MyProject.WCFClients" >
<endpoint address="" 
                                                       binding="basicHttpBinding" 
                                                       bindingConfiguration="TransportSecurity" 
                                                      contract="MyProject.WCFClients"/>
                  </service>          
            </services>
            <bindings>
   <basicHttpBinding>
<binding name="TransportSecurity">
<security mode="Transport">
<transport clientCredentialType="None" />
</security>
</binding>
</basicHttpBinding>

Error message:

Could not find a base address that matches scheme https for the endpoint with binding BasicHttpBinding. Registered base address schemes are [http].<br/>System.ServiceModel.ServiceActivationException: The service '/MyProject/WCFClients.svc' cannot be activated due to an exception during compilation.  The exception message is: Could not find a base address that matches scheme https for the endpoint with binding BasicHttpBinding. Registered base address schemes are [http].. ---> System.InvalidOperationException: Could not find a base address that matches scheme https for the endpoint with binding BasicHttpBinding. Registered base address schemes are [http].

Appreciate any suggestions in resolving this issue!!

2 Answers, 1 is accepted

Sort by
0
Jagat
Top achievements
Rank 1
answered on 20 May 2014, 03:32 PM
WCF service is within the project and it is not hosted separately. 

Can someone please suggest how this issue can be fixed?
0
Dimitar Terziev
Telerik team
answered on 23 May 2014, 07:42 AM
Hello Jagat,

When the site has a both standard and secure version additional binding configuration should be provided. Below is shown a sample configuration from one of our services used in the online examples:
<system.serviceModel>
  <behaviors>
    <endpointBehaviors>
      <behavior name="ComboBoxWcfServiceAspNetAjaxBehavior">
        <enableWebScript/>
      </behavior>
    </endpointBehaviors>
  </behaviors>
  <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true"/>
  <services>
    <service name="ComboBoxWcfService">
      <endpoint address="" behaviorConfiguration="ComboBoxWcfServiceAspNetAjaxBehavior" binding="webHttpBinding" contract="ComboBoxWcfService"/>
      <endpoint address="" behaviorConfiguration="ComboBoxWcfServiceAspNetAjaxBehavior"
                   binding="webHttpBinding" bindingConfiguration="secureBinding" contract="ComboBoxWcfService" />
    </service>
  </services>
  <bindings>
    <basicHttpBinding>
      <binding name="basicHttpEndpointBasic">
        <security mode="None">
          <transport realm=""/>
        </security>
      </binding>
    </basicHttpBinding>
    <webHttpBinding>
        <binding name="secureBinding">
          <security mode="Transport" />
        </binding>
      </webHttpBinding>
  </bindings>
</system.serviceModel>

You could use this configuration as a reference point.

Regards,
Dimitar Terziev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
ComboBox
Asked by
Jagat
Top achievements
Rank 1
Answers by
Jagat
Top achievements
Rank 1
Dimitar Terziev
Telerik team
Share this question
or