public static IIS.Binding Add(this IIS.BindingCollection bindingCollection, string bindingInformation, byte[] certificateHash, string certificateStoreName, SslFlags sslFlags) { var binding = bindingCollection.Add(bindingInformation, certificateHash, certificateStoreName); SetSslFlags(binding, sslFlags); return(binding); }
internal Binding(string protocol, string bindingInformation, byte[] hash, string store, SslFlags flags, BindingCollection parent) : base(null, "binding", null, parent, null, null) { BindingInformation = bindingInformation; Protocol = protocol; CertificateHash = hash; CertificateStoreName = store; SslFlags = flags; Parent = parent; }
public static bool RequireElevation(this BindingCollection collection) { foreach (Binding binding in collection) { if (binding.EndPoint.Port <= 1024) { return(true); } } return(false); }
private IIS.Binding EnsureBinding(IIS.BindingCollection siteBindings) { if (siteBindings == null) { throw new NoHostNameFoundException(); } IIS.Binding iisBinding = siteBindings.FirstOrDefault(); if (iisBinding == null) { throw new NoHostNameFoundException(); } return(iisBinding); }
internal Site(ConfigurationElement element, SiteCollection parent) : base(element, "site", null, parent, null, null) { ApplicationDefaults = ChildElements["applicationDefaults"] == null ? new ApplicationDefaults(parent.ChildElements["applicationDefaults"], this) : new ApplicationDefaults(ChildElements["applicationDefaults"], this); Parent = parent; Bindings = new BindingCollection(ChildElements["bindings"], this); if (element == null) { return; } foreach (ConfigurationElement node in (ConfigurationElementCollection)element) { var app = new Application(node, Applications); Applications.InternalAdd(app); } }
public Binding(ConfigurationElement element, BindingCollection parent) : base(element, "binding", null, parent, null, null) { Parent = parent; }