void InitializeForMarshal(WhereaboutsReader whereabouts) { ProtocolInformationReader protocol = whereabouts.ProtocolInformation; if (protocol != null && protocol.NetworkOutboundAccess) { // We can marshal outgoing transactions using a valid address if (protocol.IsV10Enabled) { UriBuilder builder10 = new UriBuilder(Uri.UriSchemeHttps, protocol.HostName, protocol.HttpsPort, protocol.BasePath + "/" + BindingStrings.RegistrationCoordinatorSuffix(ProtocolVersion.Version10)); this.registrationServiceAddress10 = builder10.Uri; } // when we have a WSAT1.1 coordinator if (protocol.IsV11Enabled) { UriBuilder builder11 = new UriBuilder(Uri.UriSchemeHttps, protocol.HostName, protocol.HttpsPort, protocol.BasePath + "/" + BindingStrings.RegistrationCoordinatorSuffix(ProtocolVersion.Version11)); this.registrationServiceAddress11 = builder11.Uri; } this.issuedTokensEnabled = protocol.IssuedTokensEnabled; this.maxTimeout = protocol.MaxTimeout; } else { // Generate an address that will not work // We do this in order to generate coordination contexts that can be propagated // between processes on the same node even if WS-AT is disabled UriBuilder builder = new UriBuilder(Uri.UriSchemeHttps, whereabouts.HostName, 443, DisabledRegistrationPath); this.registrationServiceAddress10 = builder.Uri; this.registrationServiceAddress11 = builder.Uri; this.issuedTokensEnabled = false; this.maxTimeout = TimeSpan.FromMinutes(5); } }
private void InitializeForMarshal(WhereaboutsReader whereabouts) { ProtocolInformationReader protocolInformation = whereabouts.ProtocolInformation; if ((protocolInformation != null) && protocolInformation.NetworkOutboundAccess) { if (protocolInformation.IsV10Enabled) { UriBuilder builder = new UriBuilder(Uri.UriSchemeHttps, protocolInformation.HostName, protocolInformation.HttpsPort, protocolInformation.BasePath + "/" + BindingStrings.RegistrationCoordinatorSuffix(ProtocolVersion.Version10)); this.registrationServiceAddress10 = builder.Uri; } if (protocolInformation.IsV11Enabled) { UriBuilder builder2 = new UriBuilder(Uri.UriSchemeHttps, protocolInformation.HostName, protocolInformation.HttpsPort, protocolInformation.BasePath + "/" + BindingStrings.RegistrationCoordinatorSuffix(ProtocolVersion.Version11)); this.registrationServiceAddress11 = builder2.Uri; } this.issuedTokensEnabled = protocolInformation.IssuedTokensEnabled; this.maxTimeout = protocolInformation.MaxTimeout; } else { UriBuilder builder3 = new UriBuilder(Uri.UriSchemeHttps, whereabouts.HostName, 0x1bb, DisabledRegistrationPath); this.registrationServiceAddress10 = builder3.Uri; this.registrationServiceAddress11 = builder3.Uri; this.issuedTokensEnabled = false; this.maxTimeout = TimeSpan.FromMinutes(5.0); } }
static WsatConfiguration() { DisabledRegistrationPath = string.Concat(BindingStrings.AddressPrefix, "/", BindingStrings.RegistrationCoordinatorSuffix(ProtocolVersion.Version10), BindingStrings.DisabledSuffix); }