Esempio n. 1
0
        protected override void OnApplicationPoolAllQueueInstancesStopped(string appPoolId, int queueId)
        {
            Debug.Print("ListenerAdapter[" + ProtocolName + "]::OnApplicationPoolAllQueueInstancesStopped(" + appPoolId + ", " + queueId + ")");

            if (!isOpen)
            {
                if (closingProcessStatus != ClosingProcessBlocked)
                {
                    // OnConfigManagerDisconnected was already called. We should just return.
                    return;
                }
            }

            try
            {
                AppPool appPool = null;
                lock (appManager)
                {
                    if (!appManager.AppPools.TryGetValue(appPoolId, out appPool))
                    {
                        // Ignore this notification if we received OnApplicationPoolDeleted.
                        return;
                    }
                }

                IActivatedMessageQueue queue = activationService.FindQueue(queueId);
                if (queue == null)
                {
                    // This is the belated notification. Ignore it.
                    return;
                }

                Fx.Assert(queue.App.AppPool.AppPoolId == appPoolId, "OnApplicationPoolAllQueueInstancesStopped: unexpected pool id");
                queue.OnQueueInstancesStopped();

                App app = queue.App;

                try
                {
                    if (app.PendingAction.ActionType == AppActionType.Deleted)
                    {
                        CompleteDeleteApp(app);
                        SignalCleanupForNoApps();
                    }
                    else if (app.PendingAction.ActionType == AppActionType.SettingsChanged)
                    {
                        CompleteAppSettingsChanged(app);
                    }
                }
                finally
                {
                    // Reset the action
                    app.SetPendingAction(null);
                }
            }
            catch (Exception exception)
            {
                HandleUnknownError(exception);
            }
        }
Esempio n. 2
0
        public App CreateApp(string appKey, string path, int siteId, string appPoolId, bool requestsBlocked)
        {
            AppPool appPool = this.AppPools[appPoolId];
            App     app     = new App(appKey, path, siteId, appPool, requestsBlocked);

            this.apps.Add(appKey, app);
            appPool.AddApp(app);

            return(app);
        }
Esempio n. 3
0
File: App.cs Progetto: JianwenSun/cc
        internal App(string appKey, string path, int siteId, AppPool appPool, bool requestsBlocked)
            : base()
        {
            Debug.Print("App.ctor(appKey:" + appKey + " path:" + path + " appPoolId:" + appPool.AppPoolId + ")");

            this.appKey = appKey;
            this.path = path;
            this.appPool = appPool;
            this.siteId = siteId;
            this.requestBlocked = requestsBlocked;
        }
Esempio n. 4
0
        internal App(string appKey, string path, int siteId, AppPool appPool, bool requestsBlocked)
            : base()
        {
            Debug.Print("App.ctor(appKey:" + appKey + " path:" + path + " appPoolId:" + appPool.AppPoolId + ")");

            this.appKey         = appKey;
            this.path           = path;
            this.appPool        = appPool;
            this.siteId         = siteId;
            this.requestBlocked = requestsBlocked;
        }
Esempio n. 5
0
        protected override void OnApplicationPoolStateChanged(string appPoolId, bool isEnabled)
        {
            try
            {
                Debug.Print("ListenerAdapter[" + ProtocolName + "]::OnApplicationPoolStateChanged(" + appPoolId + ", " + isEnabled + ")");
                AppPool appPool = null;
                lock (appManager)
                {
                    if (!appManager.AppPools.TryGetValue(appPoolId, out appPool))
                    {
                        return;
                    }

                    appPool.SetEnabledState(isEnabled);
                }
            }
            catch (Exception exception)
            {
                HandleUnknownError(exception);
            }
        }
Esempio n. 6
0
        protected override void OnApplicationPoolIdentityChanged(string appPoolId, SecurityIdentifier sid)
        {
            try
            {
                Debug.Print("ListenerAdapter[" + ProtocolName + "]::OnApplicationPoolIdentityChanged(" + appPoolId + ", " + sid + ")");

                AppPool appPool = null;
                lock (appManager)
                {
                    if (!appManager.AppPools.TryGetValue(appPoolId, out appPool))
                    {
                        return;
                    }

                    appPool.SetIdentity(sid);
                }
            }
            catch (Exception exception)
            {
                HandleUnknownError(exception);
            }
        }
Esempio n. 7
0
File: App.cs Progetto: JianwenSun/cc
 internal void OnAppPoolChanged(AppPool newAppPool)
 {
     this.appPool = newAppPool;
 }
Esempio n. 8
0
 public void CreateAppPool(string appPoolId, SecurityIdentifier sid)
 {
     AppPool appPool = new AppPool(appPoolId, false, sid);
     this.pools.Add(appPoolId, appPool);
 }
Esempio n. 9
0
 internal void OnAppPoolChanged(AppPool newAppPool)
 {
     this.appPool = newAppPool;
 }
Esempio n. 10
0
        public void CreateAppPool(string appPoolId, SecurityIdentifier sid)
        {
            AppPool appPool = new AppPool(appPoolId, false, sid);

            this.pools.Add(appPoolId, appPool);
        }