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. Related TutorialsHow to turn on View state encryption for an individual page How to use session state in ASP.NET using VB.NET How to use XML Namespaces with XNamespace class in VB.NET How to build basic web service with ASP.NET in C# – step 1 How to compare strings in ASP.NET