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.
- Add the assembly as a reference.
- change the svc file mark up to
1: <%@ ServiceHost Service="<Concrete Class>" %>
- Change the service configuration in the web.config
1: <service behaviorConfiguration="tricoder_serviceBehavior" name="<Concrete Class">
2: <endpoint address="" binding="basicHttpBinding" bindingConfiguration=""
3: contract="Interface with contracts" >
4: </endpoint>
5: <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
6: </service>
7: </services>
And make sure that you use the full name of the concrete class and the interface.
No comments:
Post a Comment