
Explanation/Reference:
How to: Publish Metadata for a Service Using Code
Target 1: ServiceHost
Target 2: ServiceHost
Within the mainmethod of a console application, instantiate a ServiceHost object by passing in the service type and the base address.
Example:
ServiceHost svcHost = new ServiceHost(
typeof(SimpleService), new Uri("http://localhost:8001/MetadataSample")); Target 3: ServiceMetaDataBehavior Target 4: ServiceMetaDataBehavior
Create a new ServiceMetadataBehavior instance.
Target 5: true
Set the HttpGetEnabled property to true.
References: https://msdn.microsoft.com/en-us/library/aa738489(v=vs.110).aspx