gpt4 book ai didi

WCF休息: WebHost failed to Process Request

转载 作者:行者123 更新时间:2023-12-02 13:13:06 27 4
gpt4 key购买 nike

我在负载均衡器后面部署了一个 WCF 服务,当我尝试使用 SOAP 访问它时,它工作得很好,但是当我尝试通过 REST url 访问它时,我收到下面提到的错误。

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

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

我相信这是主机 header 的一些问题,但不确定如何解决这个问题。任何想法将不胜感激。

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

最佳答案

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

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

</binding>
</webHttpBinding>

关于WCF休息: WebHost failed to Process Request,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1195508/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com