private static bool ConnectToLicenseServer(ref string license, string product, string productversion, string productbuild, string productSerial, string ipAddress, string macAddress, string allMacAddress, string hdSerial, string osVersion) { // send request to License server try { var eltService = new EltekLicenseServiceClient(); // license = eltService.GetLicense(product, productversion, productbuild, CUSTOMER, productSerial, Environment.UserName, Environment.MachineName, ipAddress, macAddress, hdSerial, osVersion); license = eltService.GetLicenseVer2Async(product, productversion, productbuild, CUSTOMER, productSerial, Environment.UserName, Environment.MachineName, ipAddress, macAddress, allMacAddress, hdSerial, osVersion).Result; return(true); } catch (Exception) { license = string.Empty; return(false); } }
public EltekLicenseServiceClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) : base(EltekLicenseServiceClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress) { this.Endpoint.Name = endpointConfiguration.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); }
public EltekLicenseServiceClient(EndpointConfiguration endpointConfiguration) : base(EltekLicenseServiceClient.GetBindingForEndpoint(endpointConfiguration), EltekLicenseServiceClient.GetEndpointAddress(endpointConfiguration)) { this.Endpoint.Name = endpointConfiguration.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); }
public EltekLicenseServiceClient() : base(EltekLicenseServiceClient.GetDefaultBinding(), EltekLicenseServiceClient.GetDefaultEndpointAddress()) { this.Endpoint.Name = EndpointConfiguration.BasicHttpBinding_IEltekLicenseService.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); }
private static System.ServiceModel.EndpointAddress GetDefaultEndpointAddress() { return(EltekLicenseServiceClient.GetEndpointAddress(EndpointConfiguration.BasicHttpBinding_IEltekLicenseService)); }
private static System.ServiceModel.Channels.Binding GetDefaultBinding() { return(EltekLicenseServiceClient.GetBindingForEndpoint(EndpointConfiguration.BasicHttpBinding_IEltekLicenseService)); }