Remove the WCFPublishMetadata config option, make it always on

This commit is contained in:
stackia
2016-07-28 23:58:25 +08:00
parent c13eb02e51
commit 8208e9aa77
2 changed files with 5 additions and 11 deletions

View File

@@ -105,9 +105,6 @@ namespace ArchiSteamFarm {
[JsonProperty(Required = Required.DisallowNull)]
internal readonly ushort WCFPort = DefaultWCFPort;
[JsonProperty(Required = Required.DisallowNull)]
internal readonly bool WCFPublishMetadata = false;
[JsonProperty(Required = Required.DisallowNull)]
internal readonly bool Statistics = true;

View File

@@ -89,15 +89,12 @@ namespace ArchiSteamFarm {
Logging.LogGenericInfo("Starting WCF server...");
ServiceHost = new ServiceHost(typeof(WCF), new Uri(URL));
if (Program.GlobalConfig.WCFPublishMetadata)
ServiceHost.Description.Behaviors.Add(new ServiceMetadataBehavior
{
ServiceHost.Description.Behaviors.Add(new ServiceMetadataBehavior
{
HttpGetEnabled = true
});
ServiceHost.AddServiceEndpoint(ServiceMetadataBehavior.MexContractName,
MetadataExchangeBindings.CreateMexHttpBinding(), "mex");
}
HttpGetEnabled = true
});
ServiceHost.AddServiceEndpoint(ServiceMetadataBehavior.MexContractName,
MetadataExchangeBindings.CreateMexHttpBinding(), "mex");
ServiceHost.AddServiceEndpoint(typeof(IWCF), new BasicHttpBinding(), string.Empty);
try {