RadComboBox Load on Demand (WCF Web Service) with https

3 posts, 0 answers
  1. Jagat
    Jagat avatar
    135 posts
    Member since:
    Jan 2011

    Posted 19 May 2014 Link to this post

    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. Jagat
    Jagat avatar
    135 posts
    Member since:
    Jan 2011

    Posted 20 May 2014 Link to this post

    WCF service is within the project and it is not hosted separately. 

    Can someone please suggest how this issue can be fixed?
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1266 posts

    Posted 23 May 2014 Link to this post

    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.

     
Back to Top