KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I know this has been asked many times, and answered many times, but, all the provided samples that should be working don't seem to want to work for me today. When I try to start the host, I keep getting the following error: "The contract name 'IMetadataExchange' could not be found in the list of contracts implemented by the service TraceService. Add a ServiceMetadataBehavior to the configuration file or to the ServiceHost directly to enable support for this contract." My service is being hosted in a managed windows service host as per Microsoft's example: http://msdn.microsoft.com/en-us/library/ms733069%28v=vs.90%29.aspx And here is my nice and simple config: <system.serviceModel> <services> <service name="Daff.Lae.Service.TraceService"> <endpoint address="" binding="wsHttpBinding" name="TraceService" contract="Contracts.Service.ITraceService"> <identity> <dns value="localhost" /> </identity> </endpoint> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/> <host> <baseAddresses> <add baseAddress="http://localhost:8080/TraceService" /> </baseAddresses> </host> </service> </services> <behaviors> <serviceBehaviors> <behavior name="DefaultBehavior"> <serviceDebug includeExceptionDetailInFaults="true"/> <serviceMetadata httpGetEnabled="true"/> </behavior> </serviceBehaviors> </behaviors> </system.serviceModel> Of course, the problem becomes more interesting when there are no errors if I remove this line: <endpoint ad
Tags (comma-separated)
Save Edits
Cancel