svcutil with WCF net.tcp endpoint

  • Thread starter Thread starter Franck
  • Start date Start date
F

Franck

Hi, I'm tryin to run my first WCF services through tcp/ip and I'm
unable to run svcutil against my service.
I'm hosting my service inside a Windows Service successfully but do
not succeed in downloading metadata.

Config of my windows service is the following one.

<system.serviceModel>
<!-- Services -->
<services>
<service name="HOMS.Services.Security.Classes.FunctionTypeService"
behaviorConfiguration="metadataSupport">
<host>
<baseAddresses>
<add baseAddress="net.tcp://localhost:1303/FunctionTypeService"/>
</baseAddresses>
</host>
<endpoint
contract="HOMS.Services.Security.Interfaces.IFunctionTypeService"
binding="netTcpBinding"
address=""/>
<endpoint contract
="HOMS.Services.Security.Interfaces.IFunctionTypeService"
binding="mexTcpBinding"
address="tcpmex"/>
</service>
</services >
<!-- Behaviors -->
<behaviors>
<serviceBehaviors>
<behavior name="metadataSupport">
<serviceMetadata />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>

I'm not sure of my config syntax as the svcutil one.
Can someone help me regarding this point ? provide me a sample svcutil
syntax and/or correct my config ?

Thks for your help.
 
Franck,

You have to add the endpoint for the IMetadataExchange interface. You
have the behavior, but it works in conjunction with the endpoint
declaration.

Once you have that, you can then use svcutil and point to that endpoint
to generate your proxies.

Hope this helps.
 
Back
Top