简体   繁体   English

404 - 错误:从 WCF 获取空响应服务在 Azure 中给出错误

[英]404 - Error: Getting Empty response from WCF Service is giving Error in Azure

From Azure it is giving, when I try to post to: https://wcf/service.svc/json/DoAction it comes back with an empty response.Azure开始,当我尝试发布到:https://wcf/service.svc/json/DoAction 它返回一个空响应。

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>

Enable the features of WCF in Add or remove programs in your local or in VM of Azure.在Azure的本地或VM中添加或删除程序中启用WCF的功能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM