Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the reasons that cause ServiceActivationException?

Tags:

wcf

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:

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

The service is defined like this -

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

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

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

source :

<endpoint address="" binding="basicHttpBinding" bindingConfiguration="basicHttpBinding" contract="xxxx.Shared.IntegrationServices.zzzzz.IzzzzPlugInService">
like image 356
Sujith Kp Avatar asked Jul 05 '12 06:07

Sujith Kp


1 Answers

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>
like image 108
carlosfigueira Avatar answered Nov 15 '22 15:11

carlosfigueira