WCF REST:WebHost无法处理请求

San*_*osh 5 rest wcf

我在负载均衡器后面部署了一个WCF服务,当我尝试使用SOAP来实现它时效果很好,但是当我尝试通过REST URL访问它时,我得到了下面提到的错误.

这是我尝试通过https:// devreporting.dev.sample.com/ReportingManagement.svc/getAddtionsByCategory访问它的REST URL.

负载均衡器VIP是https:// devreporting.dev.sample.com,防火墙后面只有一个服务器,即dev01

我相信这是主机头的一些问题,但不知道如何解决这个问题.任何想法将不胜感激.

Message: WebHost failed to process a request. Sender Information: System.ServiceModel.Activation.HostedHttpRequestAsyncResult/12646224 
Exception: 

System.Web.HttpException: There was no channel actively listening at 'https://dev01.dev.sample.com:17005/ReportingManagement.svc/reporting/getAddtionsByCategory'. 
        This is often caused by an incorrect address URI. 
        Ensure that the address to which the message is sent matches an address on which a service is listening. ---> 
    System.ServiceModel.EndpointNotFoundException: There was no channel actively listening at 'https://dev01.dev.sample.com:17005/ReportingManagement.svc/reporting/getAddtionsByCategory'. 
            This is often caused by an incorrect address URI. 
            Ensure that the address to which the message is sent matches an address on which a service is listening.   
    at System.ServiceModel.Activation.HostedHttpTransportManager.HttpContextReceived(HostedHttpRequestAsyncResult result)    
    at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.HandleRequest() at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.BeginRequest()
    --- End of inner exception stack trace ---    
    at System.ServiceModel.AsyncResult.End[TAsyncResult](IAsyncResult result)   
    at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) 
    Process Name: w3wp Process ID: 4760
Run Code Online (Sandbox Code Playgroud)

San*_*osh 12

Phew ...我在我的部分中缺少安全配置,当我添加它时,事情就像魅力一样

   <webHttpBinding>
    <binding name="CommerceRESTBinding">
        <security mode="Transport">
                <transport clientCredentialType = "None" proxyCredentialType="None"/>
        </security>

</binding>
  </webHttpBinding>
Run Code Online (Sandbox Code Playgroud)