Home > Software engineering >  404 - Error: Getting Empty response from WCF Service is giving Error in Azure
404 - Error: Getting Empty response from WCF Service is giving Error in Azure

Time:01-05

From Azure it is giving, when I try to post to: https://wcf/service.svc/json/DoAction it comes back with an empty response.

Below is the webconfig

 <system.serviceModel>
  <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
  <services>
    <service name="SampleService" behaviorConfiguration="ChallengeBehavior">
      <endpoint address="" binding="wsHttpBinding" bindingConfiguration="ChallengeMessageEncoding" contract="IService123" behaviorConfiguration="SoapServiceBehavior" />
      <endpoint address="/json" binding="webHttpBinding" bindingConfigu**strong text**ration="RestServiceMessageEncoding" contract="ISampleService"  behaviorConfiguration="RestServiceBehavior" />
        </service>
      </services>
      <behaviors>
        <endpointBehaviors>
          <behavior name="RestServiceBehavior">
            <webHttp defaultOutgoingResponseFormat="Json" automaticFormatSelectionEnabled="true" />
          </behavior>
          <behavior name="SoapServiceBehavior">
          </behavior>
        </endpointBehaviors>
      </behaviors>
      <bindings>
        <webHttpBinding>
          <binding name="RestServiceMessageEncoding">
            <security mode="None">
            </security>
          </binding>
        </webHttpBinding>
        <wsHttpBinding>
          <binding name="ChallengeMessageEncoding">
            <security mode="None">
              <transport clientCredentialType="None" proxyCredentialType="None" />
              <message clientCredentialType="None" establishSecurityContext="false" negotiateServiceCredential="false" />
            </security>
          </binding>
        </wsHttpBinding>
      </bindings>
    </system.serviceModel>

CodePudding user response:

Enable the features of WCF in Add or remove programs in your local or in VM of Azure.

  • Related