public static void RunAsMicroservice(this ServiceHostBase host) { // Use the custom contract resolver to ensure we can resolve all contracts and not just those natively discoverable by WCF host.AddContractResolver(); // This allows the incoming source address to not be a match for the hosted address - required when running through a load balancer host.AllowAnySourceAddress(); // Opt into extensible processing pipeline host.AddPipeline(); }