wsHttpBinding mode not giving any responce when access from .svc RRS feed

  • Question

  • Hi,

    I have created WCF service, which can be consumed by SharePoint BCS functionality.

    The service exposes metadata, but when we call functions from .svc then it wont be called and obviously service not giving any output.

    Code is as below:

        public interface IEmployeeServices
            void DoWork();

            List<EmployeeInfo> GetAllEmployees();

    public class EmployeeServices : IEmployeeServices
            public void DoWork()

            /// <summary>
            /// Return the list of employees
            /// </summary>
            /// <returns></returns>
            public List<EmployeeInfo> GetAllEmployees()
                EmployeeDBEntities dbentities = new EmployeeDBEntities();

                return dbentities.EmployeeInfoes.ToList();

    Web config

          <messageLogging logEntireMessage="true"

            <binding name="wshttpbind"  allowCookies="true" closeTimeout="00:01:00"
            receiveTimeout="00:01:00" maxReceivedMessageSize="2048" maxBufferPoolSize="2048" >
              <security mode="None"></security>
          <service name="WcfService_BCS.EmployeeServices" behaviorConfiguration="soapBehavior">
            <endpoint address="" binding="wsHttpBinding" bindingConfiguration="wshttpbind" contract="WcfService_BCS.IEmployeeServices" bindingName="wshttpbind">
                <dns value="localhost" />
            <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />

            <behavior name="soapBehavior">
              <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"
                policyVersion="Default" />
              <serviceDebug includeExceptionDetailInFaults="true" />
            <behavior name="">
              <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
              <serviceDebug includeExceptionDetailInFaults="false" />
          <add binding="basicHttpsBinding" scheme="https" />
          <add binding="wsHttpBinding" scheme="http" />

        <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
          <source name="System.ServiceModel" switchValue="Information, ActivityTracing" propagateActivity="true">
              <add name="traceListener" type="System.Diagnostics.XmlWriterTraceListener" initializeData="C:\logs\Traces.svclog"/>

    And I am calling url as


    But the URL doesn't giving any response, the function is not getting called if I put debug in the code as well.

    Kindly let me know the solution, so that the service will return the response.




    Thursday, January 14, 2016 12:46 PM


  • Hi udayan,

    According to this case, based on your code, you want to create a Restful WCF Service, so

    you haveto use the webhttpbinding. For this issue, when you use the wsHttpbinding,

    the service is SOAP style. So, you don't need to use the WebGet attribute. So, I am not

    sure which way do you want to use.

    If you want to create a Restful WCF service, please refer this links:

    1.A Guide to Designing and Building RESTful Web Services with WCF 3.5

    2.How to: Create a Basic WCF Web HTTP Service

    If you want to create a general WCF service, please refer to the following links:

    1.WCF Getting Started Tutorial

    Best Regards,

    Wanjun Dong

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate the survey.

    Friday, January 15, 2016 6:52 AM

All replies