c# - Add Binding To IIS Without Recycling Application -
we have application allows associate multiple urls , want allow our customers add new urls themselves, have following code adds bindings: using (servermanager servermanager = new servermanager()) { var site = servermanager.sites["sitename"]; var binding = site.bindings.singleordefault(x => x.host == hostname); if (binding == null) { binding = site.bindings.createelement("binding"); binding["protocol"] = "http"; string ip = "*"; string port = "80"; binding["bindinginformation"] = string.format(@"{0}:{1}:{2}", ip, port, hostname); site.bindings.add(binding); servermanager.commitchanges(); } } the issue have causes application recycle, have tested on our solution using local iis , appliation_start hit again. have manually added binding iis causes recycle. while suspect answer no solution adding binding programatically without cau...