c# - Determine bindings from IIS hosting environment -
i retrieve bindings of running iis application directly context of applications running code.
i've explored system.web.hosting.hostingenvironment, there can access properties sitename etc.
what need host string part of binding. "app.mydomain.com".
is possible? simple "yes" or "no" msdn reference suffice answer.
you might not able bindings iis config unless you're elevated (and shouldn't run elevated) should able host part of binding from:
request.servervariables["url"]; from there can load uri class , host portion.
be aware it's url request came in on. if have multiple bindings in iis config won't those.
Comments
Post a Comment