I have a WCF service exposing some 34 methods. Up until today metadata exchanging using MetadataExchangeClient
was working just fine, but suddenly I started getting the following exception:
Metadata contains a reference that cannot be resolved: http://localhost:1150/service.svc?wsdl=wsdl0
The most "interesting" thing is that if I comment out some of the methods (no matter which ones) in the service contract so that the service exposes less methods I can get metadata just right. The web.config
settings reads
<system.serviceModel>
<services>
<service name="(...)" serviceBehavior="(...)">
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="(...)"><serviceMetadata httpGetEnabled="True"></behavior>
<serviceBehaviors>
</behaviors>
All names are namespace-qualified and everything works well while exposing, say, 15 methods. Whenever I try to expose more, and no matter which ones, I get that exception. What am I doing wrong?