protected MsmqHostedTransportConfiguration(MsmqUri.IAddressTranslator addressing) : base(addressing.Scheme)
 {
     string[] bindings = HostedTransportConfigurationManager.MetabaseSettings.GetBindings(addressing.Scheme);
     this.uniqueManager = new MsmqHostedTransportManager(bindings, addressing);
     for (int i = 0; i < bindings.Length; i++)
     {
         Uri baseAddress = addressing.CreateUri(bindings[i], HostingEnvironment.ApplicationVirtualPath, false);
         base.ListenAddresses.Add(new BaseUriWithWildcard(baseAddress, HostNameComparisonMode.Exact));
         UniqueTransportManagerRegistration item = new UniqueTransportManagerRegistration(this.uniqueManager, baseAddress, HostNameComparisonMode.Exact);
         Msmq.StaticTransportManagerTable.RegisterUri(baseAddress, HostNameComparisonMode.Exact, item);
     }
     this.uniqueManager.Start(null);
 }
        protected MsmqHostedTransportConfiguration(MsmqUri.IAddressTranslator addressing)
            : base(addressing.Scheme)
        {
            AspNetPartialTrustHelpers.FailIfInPartialTrustOutsideAspNet(); 
            
            string[] bindings = HostedTransportConfigurationManager.MetabaseSettings.GetBindings(addressing.Scheme);
            
            this.uniqueManager = new MsmqHostedTransportManager(bindings, addressing);

            for (int i = 0; i < bindings.Length; i++)
            {
                Uri address = addressing.CreateUri(bindings[i], HostingEnvironment.ApplicationVirtualPath, false);
                this.ListenAddresses.Add(new BaseUriWithWildcard(address, TransportDefaults.HostNameComparisonMode));

                UniqueTransportManagerRegistration registration = new UniqueTransportManagerRegistration(uniqueManager, address, TransportDefaults.HostNameComparisonMode);
                Msmq.StaticTransportManagerTable.RegisterUri(address, TransportDefaults.HostNameComparisonMode, registration);
            }

            this.uniqueManager.Start(null);
        }