4

I added a WCF service in an existing MVC web application for showing it on the OLAP cube tool (Syncfusion). What happens when i execute the application with http enabled site, I am able to access the WCF method like below,

Code

$("#OlapClient").ejOlapClient({ url: "/Areas/OLAP/wcf/OlapClientService.svc"});

But when I do it from https enabled site I am not able to access the WCF method. It simply throws 404 method not found exception. Here is the below web.config for my WCF.

Web.config

<system.serviceModel>
 <behaviors>
  <endpointBehaviors>

    <behavior name="OLAP.wcf.OlapClientServiceAspNetAjaxBehavior">
      <enableWebScript />
    </behavior>
  </endpointBehaviors>
  <serviceBehaviors>
    <behavior name="">
      <serviceMetadata httpsGetEnabled="false" />
      <serviceDebug includeExceptionDetailInFaults="true" />
    </behavior>
  </serviceBehaviors>

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

  <service name="OLAP.wcf.OlapClientService">
    <endpoint address="" behaviorConfiguration="OLAP.wcf.OlapClientServiceAspNetAjaxBehavior" binding="webHttpBinding" contract="OLAP.wcf.IOlapClientService">

    </endpoint>
  </service>
</services>
<bindings>
  <basicHttpBinding>
    <binding name="BasicHttpBinding_IService1" />
  </basicHttpBinding>
</bindings>
<client>
  <endpoint address="http://localhost:15415/VibrantWS.svc/soap"
    binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IService1"
    contract="ServiceReference1.IService1" name="BasicHttpBinding_IService1" />
</client>
</system.serviceModel>
DonMax
  • 970
  • 3
  • 12
  • 47

1 Answers1

1
  1. If you working on .Net Frame work 4.5 advanced service, please the ensure IIS configuration under “.Net Frame work 4.5 advanced service  WCF Serivce options  HTTP Activation (need to be checked)” .

  2. Ensure the following settings in web.config as mention in below link.

https://msdn.microsoft.com/en-us/library/hh556232(v=vs.110).aspx

Enable SSL for my WCF service

HTTPS-enabled, IIS hosted WCF service, How to secure it?

  1. Try the WEB API controller instead of WCF Service to avoid this problem.
Community
  • 1
  • 1