How to get site name in ASP.NET

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

C# in Depth, 3rd EditionManaged Windows VPS Hosting

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

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