WCF services and type names

Published 04-12-2006 4:44 PM
If you get the following error message while trying to run a WCF service:

Service 'SomeServiceType' has zero application (non-infrastructure) endpoints.  This might be because no configuration file was found for your application, or because there was a problem with the type in the configuration file, or no endpoints were defined in the configuration file.

You might want to try to change your name attribute of your service (this attribute used to be called the type attribute in the pre-feb ctp's) from the assembly-included name to only the class-name. You need to do the same thing with a contract.

If you had a service called Services.Foo in an assembly called Services.dll and a contract called Services.Contracts.IFoo in an assembly called Services.Contracts.dll you will get the following service configuration:

<service name="Services.Foo">
    <endpoint
        address="http://localhost:8000/FooService"
        binding="wsHttpBinding"
        contract="Services.Contracts.IFoo" />
</service>

As you can see, the assembly names aren't mentioned. IMHO this is the right thing to do but is not quite evident becase a lot of the documentation if still pre feb-ctp. I found the solution for this problem here.

Another one of those things that kept me going for a while :-)

Leave a Comment

(required) 
(required) 
(optional)
(required)