System.Web.Hosting.ApplicationHost.SetHostingEnvironment C# (CSharp) Method

SetHostingEnvironment() static private method

static private SetHostingEnvironment ( ) : void
return void
		static void SetHostingEnvironment ()
		{
			bool shadow_copy_enabled = true;
			HostingEnvironmentSection he = WebConfigurationManager.GetWebApplicationSection ("system.web/hostingEnvironment") as HostingEnvironmentSection;
			if (he != null)
				shadow_copy_enabled = he.ShadowCopyBinAssemblies;

			if (shadow_copy_enabled) {
				AppDomain current = AppDomain.CurrentDomain;
				current.SetShadowCopyFiles ();
				current.SetShadowCopyPath (current.SetupInformation.PrivateBinPath);
			}

			HostingEnvironment.IsHosted = true;
			HostingEnvironment.SiteName = HostingEnvironment.ApplicationID;
		}
#endif