mikeobrien.net Curriculum Vitae Blog Labs
Saturday, April 25, 2009

Donn Felker has the real answer here!

Saturday, April 25, 2009 5:56:17 AM (GMT Daylight Time, UTC+01:00)  #   |  Comments [0]  |  Trackback
Tuesday, November 13, 2007

I have gotten the following exception a couple of times:

Service 'Translator' has zero application (non-infrastructure) endpoints. This might be because no configuration file was found for your application, or because no service element matching the service name could be found in the configuration file, or because no endpoints were defined in the service element.

There are a number of things that could potentially cause this exception but the one that has gotten me a couple of times is making sure the name attribute of the service element in the .config contains the fully qualified class name. So for example if I have the following service:

namespace BabelFish.ServiceHost.Web
{
    public class Translator : BabelFish.Services.Translator
    {
    }
}

The service name should be as follows (in bold):

<configuration>
    <
system.serviceModel>
        <
services>
            <
service behaviorConfiguration="TranslatorBehavior" name="BabelFish.ServiceHost.Web.Translator">
                <
endpoint address="http://localhost/BabelFish.ServiceHost.Web/Translator.svc" binding="wsHttpBinding" name="Translator" contract="BabelFish.Services.Contracts.Service.ITranslator"/>
               <
endpoint address="mex" binding="mexHttpBinding" name="MetaDataExchange" contract="IMetadataExchange"/>
            </
service>
        </
services>
        ...
    </system.serviceModel>
    ...
</configuration>
Tuesday, November 13, 2007 4:36:39 PM (GMT Standard Time, UTC+00:00)  #   |  Comments [0]  |  Trackback
Monday, November 12, 2007

In order to configure WCF 3.0 to run under ASP.NET you need to run the installer (ServiceModelReg.exe) in the WFC 3.0 Framework folder (<system drive>\<windows folder>\Microsoft.NET\Framework\v3.0\Windows Communication Foundation) with the /i parameter.

image

Monday, November 12, 2007 10:49:55 PM (GMT Standard Time, UTC+00:00)  #   |  Comments [0]  |  Trackback
Creative Commons License