How to get site name in ASP.NET

You could get the IIS site name using the GetSiteName method.

System.Web.Hosting.HostingEnvironment.ApplicationHost.GetSiteName();

The GetSiteName is introduced in the .NET Framework version 3.5.