/// <summary> /// Initializes a new instance of the object. /// </summary> /// <param name="domainID">Identifier of the domain that the user belongs to.</param> private ClientUpgrade(string domainID) { // Set the web state when authentication is really required... WebState ws = new WebState(domainID, domainID); // Get the address of the host service. hostAddress = DomainProvider.ResolveLocation(domainID).ToString(); // Setup the url to the server. service = new ClientUpdate(); service.Url = hostAddress + "/ClientUpdate.asmx"; ws.InitializeWebClient(service, domainID); }
private void SetHostAddress(string domainID) { // Get the current address for this domain. Uri currentAddress = DomainProvider.ResolveLocation(domainID); if (currentAddress != null) { UriBuilder ub = new UriBuilder(currentAddress); ub.Host = "mylocalhost"; DomainProvider.SetHostLocation(domainID, ub.Uri); } currentAddress = DomainProvider.ResolveLocation(domainID); if ((currentAddress == null) || (currentAddress.Host != "mylocalhost")) { throw new ApplicationException("Did not set host address."); } }