I want to enable WSDL retrieval for a webservice that I created. I can 'call' the webservice through the .svc file that I made:
http://localhost/test.svc
<%@ ServiceHost Language="C#" Debug="true" Service="Project.MyService" CodeBehind="MyService.svc.cs" %>
Calling the page gives the standard .NET message saying "Metadata publishing for this service is currently disabled." with instructions to enable publishing.
I followed instructions and added the web.config entries, however calling http://localhost/test.svc?wsdl produces the same result... How can I enable WSDL publishing for my webservice?
web.config entries
<service name="Project.IMyService" behaviorConfiguration="MyServiceTypeBehaviors" >
<endpoint contract="IMetadataExchange" binding="mexHttpBinding"
address="mex"
/>
<host>
<baseAddresses>
<add baseAddress="http://localhost/test.svc"/>
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="MyServiceTypeBehaviors">
<serviceMetadata httpGetEnabled="true" />
</behavior>
</serviceBehaviors>
</behaviors>