Fix WCF on Mono

It doesn't support metadata in tcp binding
This commit is contained in:
JustArchi
2016-12-11 17:58:53 +01:00
parent cf4e9172ee
commit e90780ddac

View File

@@ -108,13 +108,9 @@ namespace ArchiSteamFarm {
try {
ServiceHost = new ServiceHost(typeof(WCF), new Uri(URL));
ServiceHost.Description.Behaviors.Add(new ServiceMetadataBehavior());
ServiceHost.AddServiceEndpoint(ServiceMetadataBehavior.MexContractName, MetadataExchangeBindings.CreateMexTcpBinding(), "mex");
ServiceHost.AddServiceEndpoint(typeof(IWCF), new NetTcpBinding(), string.Empty);
ServiceHost.Open();
ASF.ArchiLogger.LogGenericInfo("WCF server ready!");
} catch (AddressAccessDeniedException) {
ASF.ArchiLogger.LogGenericError("WCF service could not be started because of AddressAccessDeniedException!");