public SimpleApplicationHost(VirtualPath virtualPath, string physicalPath)
		{
			if(StringUtil.IsNullOrEmpty(physicalPath))
				throw new ArgumentException("physicalPath");

			_appVirtualPath = virtualPath;
			_appPhysicalPath = physicalPath.EndsWith(@"\") ? physicalPath : (physicalPath + @"\");
		}
		internal ObjectHandle CreateInstanceInNewWorkerAppDomain(Type type, string appId, VirtualPath virtualPath, string physicalPath)
		{
			IApplicationHost appHost = new SimpleApplicationHost(virtualPath, physicalPath);
            HostingEnvironmentParameters hostingParameters = new HostingEnvironmentParameters();
            hostingParameters.HostingFlags = HostingEnvironmentFlags.HideFromAppManager;
            return CreateAppDomainWithHostingEnvironmentAndReportErrors(appId, appHost, hostingParameters).CreateInstance(type);
		}
		private static void PopulateDomainBindings(string domainId, string appId, string appName, string appPath, VirtualPath appVPath, AppDomainSetup setup, IDictionary dict)
		{
			//setup.ShadowCopyFiles = "true";
			setup.ApplicationBase = appPath;
            if (Directory.Exists(Path.Combine(appPath, "bin")))
            {
                setup.PrivateBinPath = "bin";
                setup.PrivateBinPathProbe = "*";
            }
            setup.ApplicationName = appName;
			setup.ConfigurationFile = "Web.config";
			setup.DisallowCodeDownload = true;
			dict.Add(".appDomain", "*");
			dict.Add(".appId", appId);
			dict.Add(".appPath", appPath);
			dict.Add(".appVPath", appVPath.VirtualPathString);
			dict.Add(".domainId", domainId);
		}
 private static string CreateSimpleAppId(VirtualPath virtualPath, string physicalPath, string siteName)
 {
     string str = virtualPath.VirtualPathString + physicalPath;
     if (!string.IsNullOrEmpty(siteName))
         str = str + siteName;
     return str.GetHashCode().ToString("x", CultureInfo.InvariantCulture);
 }
		internal void Initialize(ApplicationManager appManager, IApplicationHost appHost)
		{
			_appManager = appManager;
			_appId = FluorineRuntime.AppDomainAppIdInternal;
			_appVirtualPath = FluorineRuntime.AppDomainAppVirtualPathObject;
			_appPhysicalPath = FluorineRuntime.AppDomainAppPathInternal;
			_appHost = appHost;
			_initiateShutdownWorkItemCallback = new WaitCallback(InitiateShutdownWorkItemCallback);
		}
 internal ApplicationInfo(string id, VirtualPath virtualPath, string physicalPath)
 {
     _id = id;
     _virtualPath = virtualPath;
     _physicalPath = physicalPath;
 }
		private void Init()
		{
			try
			{
				if (GetAppDomainString(".appDomain") != null)
				{
					_appDomainAppId = GetAppDomainString(".appId");
					_appDomainAppPath = GetAppDomainString(".appPath");
					_appDomainAppVPath = VirtualPath.CreateNonRelativeTrailingSlash(GetAppDomainString(".appVPath"));
					_appDomainId = GetAppDomainString(".domainId");
                    _appDomainUnloadallback = new WaitCallback(ReleaseResourcesAndUnloadAppDomain);
				}
			}
			catch (Exception exception)
			{
				if(_log != null && _log.IsFatalEnabled )
					_log.Fatal(exception.Message, exception);
			}
		}