title: Hosted WCF service inside MVC Web application
body: <p>I added a WCF service in an existing MVC web application for showing it on the OLAP cube tool (<a href="http://help.syncfusion.com/js/olapclient/data-binding#wcf" rel="nofollow">Syncfusion</a>). What happens when i execute the application with http enabled site, I am able to access the WCF method like below,</p>
  
  <p><strong>Code</strong></p>
  
  <pre><code>$("#OlapClient").ejOlapClient({ url: "/Areas/OLAP/wcf/OlapClientService.svc"});
  </code></pre>
  
  <p>But when I do it from <code>https</code> enabled site I am not able to access the WCF method. It simply throws <code>404 method not found exception</code>. Here is the below web.config for my WCF.</p>
  
  <p><strong>Web.config</strong></p>
  
  <pre><code>&lt;system.serviceModel&gt;
   &lt;behaviors&gt;
    &lt;endpointBehaviors&gt;
  
      &lt;behavior name="OLAP.wcf.OlapClientServiceAspNetAjaxBehavior"&gt;
        &lt;enableWebScript /&gt;
      &lt;/behavior&gt;
    &lt;/endpointBehaviors&gt;
    &lt;serviceBehaviors&gt;
      &lt;behavior name=""&gt;
        &lt;serviceMetadata httpsGetEnabled="false" /&gt;
        &lt;serviceDebug includeExceptionDetailInFaults="true" /&gt;
      &lt;/behavior&gt;
    &lt;/serviceBehaviors&gt;
  
  &lt;/behaviors&gt;
  &lt;serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" /&gt;
  &lt;services&gt;
  
    &lt;service name="OLAP.wcf.OlapClientService"&gt;
      &lt;endpoint address="" behaviorConfiguration="OLAP.wcf.OlapClientServiceAspNetAjaxBehavior" binding="webHttpBinding" contract="OLAP.wcf.IOlapClientService"&gt;
  
      &lt;/endpoint&gt;
    &lt;/service&gt;
  &lt;/services&gt;
  &lt;bindings&gt;
    &lt;basicHttpBinding&gt;
      &lt;binding name="BasicHttpBinding_IService1" /&gt;
    &lt;/basicHttpBinding&gt;
  &lt;/bindings&gt;
  &lt;client&gt;
    &lt;endpoint address="http://localhost:15415/VibrantWS.svc/soap"
      binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IService1"
      contract="ServiceReference1.IService1" name="BasicHttpBinding_IService1" /&gt;
  &lt;/client&gt;
  &lt;/system.serviceModel&gt;
  </code></pre>