title: Get IIS bindings at runtime
body: <p>I wonder how to get the IIS binding settings of the current site (host name, port, IP address) at runtime using ASP.NET.
  Does .NET provide any way to get these information?</p>
  
  <p>Edit: I need a way to get the http and https ports configured to redirect to the right port when switching from http to https, and back from https to http if other ports then 80/443 are used. Is there a way to do this without extended privileges?</p>
  
  <p>Regards</p>