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

			_appVirtualPath = virtualPath;
			_appPhysicalPath = physicalPath.EndsWith(@"\") ? physicalPath : (physicalPath + @"\");
		}
Exemplo n.º 2
0
		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);
		}
Exemplo n.º 3
0
		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);
		}
Exemplo n.º 4
0
 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);
 }
Exemplo n.º 5
0
		internal void Initialize(ApplicationManager appManager, IApplicationHost appHost)
		{
			_appManager = appManager;
			_appId = FluorineRuntime.AppDomainAppIdInternal;
			_appVirtualPath = FluorineRuntime.AppDomainAppVirtualPathObject;
			_appPhysicalPath = FluorineRuntime.AppDomainAppPathInternal;
			_appHost = appHost;
			_initiateShutdownWorkItemCallback = new WaitCallback(InitiateShutdownWorkItemCallback);
		}
Exemplo n.º 6
0
 internal ApplicationInfo(string id, VirtualPath virtualPath, string physicalPath)
 {
     _id = id;
     _virtualPath = virtualPath;
     _physicalPath = physicalPath;
 }
Exemplo n.º 7
0
		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);
			}
		}