WCF With Out a Codefile

I’m always forgetting this.  If you want to use wcf using an assembly instead of a code file here is what you have to do.

  1. Add the assembly as a reference.

  2. change the svc file mark up to

    1
    <%@ ServiceHost Service=”“  %>
  3. Change the service configuration in the web.config

    1
    2
    3
    4
    5
    6
    7
    <service behaviorConfiguration=”tricoder_serviceBehavior” name=<Concrete Class”>
    <endpoint address=”” binding=”basicHttpBinding” bindingConfiguration=””
    contract=”Interface with contracts” >
    </endpoint>
    <endpoint address=”mex” binding=”mexHttpBinding” contract=”IMetadataExchange” />
    </service>

    And make sure that you use the full name of the concrete class and the interface.

Technorati Tags: [wcf](https://technorati.com/tags/wcf),[.Net](https://technorati.com/tags/.Net)