break

WCF: Metadata publishing is currently disabled.

This basically means that you must now explicitly configure metadata endpoints for your service by adding the ServiceMetadataBehavior.

This is accomplished in 2 steps:

1- First add a behavior configuration to your <service> . For example

<service name=”WCFServiceLibrary2.service1″ behaviorConfiguration=”MyServiceTypeBehaviors”>

2- Add a behavior named “MyServiceTypeBehaviors” and add a <ServiceMetadata>. For example

<behaviors>
<serviceBehaviors>
<behavior name=”MyServiceTypeBehaviors” >
<serviceMetadata httpGetEnabled=”true” />
</behavior>
</serviceBehaviors>
</behaviors>

Your final configuration file should look like this:

<configuration>
<system.serviceModel>
<services>
<service name=”WCFServiceLibrary2.service1″ behaviorConfiguration=”MyServiceTypeBehaviors”>
<endpoint contract=”WCFServiceLibrary2.IService1″ binding=”wsHttpBinding”/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name=”MyServiceTypeBehaviors” >
<serviceMetadata httpGetEnabled=”true” />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.

CAPTCHA Image
Reload Image