导致ServiceActivationException的原因有哪些? [英] What are the reasons that cause ServiceActivationException?

查看:24
本文介绍了导致ServiceActivationException的原因有哪些?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I have a service which is hosted in Azure environment. i am consuming that service using a console application. While doing so, i get exception:

请求的服务,'http://xxxx-d.yyyy.be/Services/zzzzInService.svc' 不能活性.有关更多信息,请参阅服务器的诊断跟踪日志信息."

"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."

谁能帮我找到我遗漏的东西?

Can anyone help me to find what i am missing ?

服务是这样定义的——

<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 我收到这些消息 -

When i Use the link http://xxxx-d.yyyy.be/Services/zzzzInService.svc in browser i get these messsage -

system.serviceModel/bindings/basicHttpBinding 的绑定没有有一个名为basicHttpBinding"的配置绑定.这是无效的bindingConfiguration 的值.

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"绑定配置.由于您没有发布完整的配置,并且错误消息说明了这一点,因此我假设是这种情况.

The error says that you don't have a binding configuration for "basicHttpBinding" named "basicHttpBinding". Since you didn't post your complete config, and the error message says that, I'll assume that this is the case.

下面的配置(在 下)在 下有两个绑定定义,一个用于端点声明中的每个绑定配置.您的配置中也应该有类似的内容.

The config below (under <system.serviceModel>) has two binding definitions under <basicHttpBinding>, one for each binding configuration you have in your endpoint declarations. You should have something similar in your config as well.

<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>

这篇关于导致ServiceActivationException的原因有哪些?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆