i want to get host header from web application programatically:
for example in below code i got absolute url of web application "http://example.com" in RootUrl variable, from this web application, i want to get host header "example.com"
, how it can be done?
RootUrl = SPContext.Current.Site.WebApplication.GetAbsoluteUrl();