In my ASP.NET web app I\'d like to look up the name it was given when it was created in IIS, which is unique to the server. I\'d not interested in the domain name for the web si
As @belugabob and @CarlosAg already mentioned I'd rather use System.Web.Hosting.HostingEnvironment.SiteName
instead of System.Web.Hosting.HostingEnvironment.ApplicationHost.GetSiteName()
because IApplicationHost.GetSiteName method is not intended to be called directly! (msdn)
So you're better off using HostingEnvironment.SiteName property! (msdn)
I think this should be the correct answer in respect to the documentation ;)