diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/AppPoolState.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/AppPoolState.cs
index 6327db0b..9532f906 100644
--- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/AppPoolState.cs
+++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/AppPoolState.cs
@@ -6,8 +6,10 @@ namespace WebsitePanel.Providers
public enum AppPoolState
{
Unknown = 0,
- Start = 1,
- Stop = 2,
- Recycle = 3
+ Starting = 1,
+ Started = 2,
+ Stopping = 3,
+ Stopped = 4,
+ Recycle = 5
}
}
diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/WebObjects/WebObjectsModuleService.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/WebObjects/WebObjectsModuleService.cs
index 2bb975e4..21774080 100644
--- a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/WebObjects/WebObjectsModuleService.cs
+++ b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/WebObjects/WebObjectsModuleService.cs
@@ -351,9 +351,6 @@ namespace WebsitePanel.Providers.Web.Iis.WebObjects
// AppPool
public void ChangeAppPoolState(string siteId, AppPoolState state)
{
- // del
- File.AppendAllText(@"c:\websitepanel\test.log", "ChangeAppPoolState " + siteId + " state " + state.ToString() + "\r\n");
-
using (var srvman = GetServerManager())
{
var site = srvman.Sites[siteId];
@@ -361,34 +358,44 @@ namespace WebsitePanel.Providers.Web.Iis.WebObjects
if (site == null)
return;
- string AppPoolName = site.ApplicationDefaults.ApplicationPoolName;
foreach (Application app in site.Applications)
- AppPoolName = app.ApplicationPoolName;
-
- if (string.IsNullOrEmpty(AppPoolName))
- return;
-
- ApplicationPool pool = srvman.ApplicationPools[AppPoolName];
- if (pool == null) return;
-
- //
- switch (state)
{
- case AppPoolState.Start:
- pool.Start();
- pool.AutoStart = true;
- break;
- case AppPoolState.Stop:
- pool.Stop();
- pool.AutoStart = false;
- break;
- case AppPoolState.Recycle:
- pool.Recycle();
- pool.AutoStart = true;
- break;
+ string AppPoolName = app.ApplicationPoolName;
+
+ if (string.IsNullOrEmpty(AppPoolName))
+ continue;
+
+ ApplicationPool pool = srvman.ApplicationPools[AppPoolName];
+ if (pool == null) continue;
+
+ //
+ switch (state)
+ {
+ case AppPoolState.Started:
+ case AppPoolState.Starting:
+ if ((pool.State != ObjectState.Started) && (pool.State != ObjectState.Starting))
+ {
+ pool.Start();
+ pool.AutoStart = true;
+ }
+ break;
+ case AppPoolState.Stopped:
+ case AppPoolState.Stopping:
+ if ((pool.State != ObjectState.Stopped) && (pool.State != ObjectState.Stopping))
+ {
+ pool.Stop();
+ pool.AutoStart = false;
+ }
+ break;
+ case AppPoolState.Recycle:
+ pool.Recycle();
+ pool.AutoStart = true;
+ break;
+ }
+
+ srvman.CommitChanges();
+
}
- //
- srvman.CommitChanges();
}
}
@@ -416,16 +423,16 @@ namespace WebsitePanel.Providers.Web.Iis.WebObjects
switch (pool.State)
{
case ObjectState.Started:
- state = AppPoolState.Start;
+ state = AppPoolState.Started;
break;
case ObjectState.Starting:
- state = AppPoolState.Start;
+ state = AppPoolState.Starting;
break;
case ObjectState.Stopped:
- state = AppPoolState.Stop;
+ state = AppPoolState.Stopped;
break;
case ObjectState.Stopping:
- state = AppPoolState.Stop;
+ state = AppPoolState.Stopping;
break;
}
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Themes/Default/Buttons.skin b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Themes/Default/Buttons.skin
index d371a071..516cb229 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Themes/Default/Buttons.skin
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Themes/Default/Buttons.skin
@@ -31,6 +31,7 @@ Default skin template. The following skins are provided as examples only.
+ |
|
-
- <%-- AppPool --%>
-
- App Pool : |
- <%-- AppPool --%>
-
-
|
-
- <%-- AppPool --%>
-
- - - | |
+ |
+
+ |
+
+ |
- <%-- AppPool --%>
-