gpt4 book ai didi

wcf - 导致 ServiceActivationException 的原因是什么?

转载 作者:行者123 更新时间:2023-12-04 15:35:38 25 4
gpt4 key购买 nike

我有一个托管在 Azure 环境中的服务。我正在使用控制台应用程序使用该服务。这样做时,我得到了异常:

"The requested service, 'http://xxxx-d.yyyy.be/Services/zzzzInService.svc' could not be activated. See the server's diagnostic trace logs for more information."



谁能帮我找到我缺少的东西?

该服务的定义如下 -
<service name="xxxx.AppServer.Host.Services.yyyyy.zzzzPlugInService"
behaviorConfiguration="MetadataBehavior" xdt:Locator="XPath(//service[@name='xxxx.AppServer.Host.Services.yyyy.zzzzPlugInService'])" xdt:Transform="Replace">

<endpoint address="" binding="basicHttpBinding" bindingConfiguration="basicHttpBinding" contract="xxxx.Shared.IntegrationServices.yyyy.IzzzzPlugInService">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="basicHttpsBinding" contract="xxxx.Shared.IntegrationServices.yyyy.IzzzzPlugInService">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>

当我使用链接 http://xxxx-d.yyyy.be/Services/zzzzInService.svc在浏览器中,我收到这些消息-

The binding at system.serviceModel/bindings/basicHttpBinding does not have a configured binding named 'basicHttpBinding'. This is an invalid value for bindingConfiguration.



来源 :
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="basicHttpBinding" contract="xxxx.Shared.IntegrationServices.zzzzz.IzzzzPlugInService">

最佳答案

该错误表明您没有名为“basicHttpBinding”的“basicHttpBinding”的绑定(bind)配置。由于您没有发布完整的配置,并且错误消息说,我假设是这种情况。

下面的配置(在 <system.serviceModel> 下)在 <basicHttpBinding> 下有两个绑定(bind)定义,一个用于您在端点声明中的每个绑定(bind)配置。您的配置中也应该有类似的东西。

<services>
<service name="xxxx.AppServer.Host.Services.yyyyy.zzzzPlugInService"
behaviorConfiguration="MetadataBehavior"
xdt:Locator="XPath(//service[@name='xxxx.AppServer.Host.Services.yyyy.zzzzPlugInService'])"
xdt:Transform="Replace">
<endpoint address=""
binding="basicHttpBinding"
bindingConfiguration="basicHttpBinding"
contract="xxxx.Shared.IntegrationServices.yyyy.IzzzzPlugInService">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint address=""
binding="basicHttpBinding"
bindingConfiguration="basicHttpsBinding"
contract="xxxx.Shared.IntegrationServices.yyyy.IzzzzPlugInService">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
<bindings>
<basicHttpBinding>
<binding name="basicHttpBinding" />
<binding name="basicHttpsBinding">
<security mode="Transport" />
</binding>
</basicHttpBinding>
</bindings>

关于wcf - 导致 ServiceActivationException 的原因是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11338729/

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