svcutil with WCF net.tcp endpoint


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.
 
Ad

Advertisements

N

Nicholas Paldino [.NET/C# MVP]

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.
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top