Commit Bug fixes from Helicon for Web Gallery and WebPI Installer
This commit is contained in:
commit
5c70ddda8e
23 changed files with 182 additions and 74 deletions
|
@ -19,3 +19,4 @@ WebsitePanel/Build
|
||||||
WebsitePanel.Installer/Build
|
WebsitePanel.Installer/Build
|
||||||
WebsitePanel/Bin
|
WebsitePanel/Bin
|
||||||
msbuild.log
|
msbuild.log
|
||||||
|
_ReSharper.*
|
||||||
|
|
|
@ -864,12 +864,13 @@ namespace WebsitePanel.Setup
|
||||||
ServerManager serverManager = new ServerManager();
|
ServerManager serverManager = new ServerManager();
|
||||||
ApplicationPool pool = serverManager.ApplicationPools.Add(name);
|
ApplicationPool pool = serverManager.ApplicationPools.Add(name);
|
||||||
|
|
||||||
if (!String.IsNullOrEmpty(username))
|
if (!String.IsNullOrEmpty(username))
|
||||||
{
|
{
|
||||||
pool.ProcessModel.IdentityType = ProcessModelIdentityType.SpecificUser;
|
pool.ProcessModel.IdentityType = ProcessModelIdentityType.SpecificUser;
|
||||||
pool.ProcessModel.UserName = username;
|
pool.ProcessModel.UserName = username;
|
||||||
pool.ProcessModel.Password = password;
|
pool.ProcessModel.Password = password;
|
||||||
}
|
pool.ProcessModel.LoadUserProfile = true;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pool.ProcessModel.IdentityType = ProcessModelIdentityType.NetworkService;
|
pool.ProcessModel.IdentityType = ProcessModelIdentityType.NetworkService;
|
||||||
|
@ -961,6 +962,7 @@ namespace WebsitePanel.Setup
|
||||||
pool.ProcessModel.IdentityType = ProcessModelIdentityType.SpecificUser;
|
pool.ProcessModel.IdentityType = ProcessModelIdentityType.SpecificUser;
|
||||||
pool.ProcessModel.UserName = username;
|
pool.ProcessModel.UserName = username;
|
||||||
pool.ProcessModel.Password = password;
|
pool.ProcessModel.Password = password;
|
||||||
|
pool.ProcessModel.LoadUserProfile = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -78,12 +78,12 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
|
|
||||||
if (Utils.ParseBool(serviceSettings["FeedEnableMicrosoft"], true))
|
if (Utils.ParseBool(serviceSettings["FeedEnableMicrosoft"], true))
|
||||||
{
|
{
|
||||||
arFeeds.Add("https://www.microsoft.com/web/webpi/3.0/WebProductList.xml");
|
arFeeds.Add(esServers.MAIN_WPI_FEED);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Utils.ParseBool(serviceSettings["FeedEnableHelicon"], true))
|
if (Utils.ParseBool(serviceSettings["FeedEnableHelicon"], true))
|
||||||
{
|
{
|
||||||
arFeeds.Add("http://www.helicontech.com/zoo/feed/wsp");
|
arFeeds.Add(esServers.HELICON_WPI_FEED);
|
||||||
}
|
}
|
||||||
|
|
||||||
string additionalFeeds = serviceSettings["FeedUrls"];
|
string additionalFeeds = serviceSettings["FeedUrls"];
|
||||||
|
|
|
@ -54,6 +54,9 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
[ToolboxItem(false)]
|
[ToolboxItem(false)]
|
||||||
public class esServers : System.Web.Services.WebService
|
public class esServers : System.Web.Services.WebService
|
||||||
{
|
{
|
||||||
|
public const string MAIN_WPI_FEED = "https://www.microsoft.com/web/webpi/4.0/WebProductList.xml";
|
||||||
|
public const string HELICON_WPI_FEED = "http://www.helicontech.com/zoo/feed/wsp4";
|
||||||
|
|
||||||
#region Servers
|
#region Servers
|
||||||
[WebMethod]
|
[WebMethod]
|
||||||
public List<ServerInfo> GetAllServers()
|
public List<ServerInfo> GetAllServers()
|
||||||
|
@ -677,12 +680,12 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
|
|
||||||
if (Utils.ParseBool(wpiSettings["FeedEnableMicrosoft"] ,true))
|
if (Utils.ParseBool(wpiSettings["FeedEnableMicrosoft"] ,true))
|
||||||
{
|
{
|
||||||
arFeeds.Add( "https://www.microsoft.com/web/webpi/3.0/WebProductList.xml" );
|
arFeeds.Add( MAIN_WPI_FEED );
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Utils.ParseBool(wpiSettings["FeedEnableHelicon"] ,true))
|
if (Utils.ParseBool(wpiSettings["FeedEnableHelicon"] ,true))
|
||||||
{
|
{
|
||||||
arFeeds.Add( "http://www.helicontech.com/zoo/feed/wsp" );
|
arFeeds.Add( HELICON_WPI_FEED );
|
||||||
}
|
}
|
||||||
|
|
||||||
string additionalFeeds = wpiSettings["FeedUrls"];
|
string additionalFeeds = wpiSettings["FeedUrls"];
|
||||||
|
|
|
@ -67,10 +67,7 @@
|
||||||
<Reference Include="Microsoft.Web.Management, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Web.Management, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\Lib\References\Microsoft\Microsoft.Web.Management.dll</HintPath>
|
<HintPath>..\..\Lib\References\Microsoft\Microsoft.Web.Management.dll</HintPath>
|
||||||
</Reference>
|
<Private>True</Private>
|
||||||
<Reference Include="Microsoft.Web.PlatformInstaller, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
|
||||||
<SpecificVersion>False</SpecificVersion>
|
|
||||||
<HintPath>..\..\Lib\Microsoft.Web.PlatformInstaller.dll</HintPath>
|
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
|
|
|
@ -43,6 +43,7 @@ using WebsitePanel.Server.Utils;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using Microsoft.Practices.EnterpriseLibrary.Caching.Expirations;
|
using Microsoft.Practices.EnterpriseLibrary.Caching.Expirations;
|
||||||
|
using DeploymentParameter = WebsitePanel.Providers.WebAppGallery.DeploymentParameter;
|
||||||
|
|
||||||
namespace WebsitePanel.Providers.Web.WPIWebApplicationGallery
|
namespace WebsitePanel.Providers.Web.WPIWebApplicationGallery
|
||||||
{
|
{
|
||||||
|
@ -56,13 +57,7 @@ namespace WebsitePanel.Providers.Web.WPIWebApplicationGallery
|
||||||
public WPIApplicationGallery(string sufix)
|
public WPIApplicationGallery(string sufix)
|
||||||
{
|
{
|
||||||
_sufix = sufix;
|
_sufix = sufix;
|
||||||
//_feeds = new[]
|
|
||||||
// {
|
|
||||||
// "https://www.microsoft.com/web/webpi/3.0/webproductlist.xml",
|
|
||||||
// "http://www.helicontech.com/zoo/feed/wsp"
|
|
||||||
// };
|
|
||||||
_cache = CacheFactory.GetCacheManager();
|
_cache = CacheFactory.GetCacheManager();
|
||||||
//_wpi = GetWpiHelper();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -79,8 +74,6 @@ namespace WebsitePanel.Providers.Web.WPIWebApplicationGallery
|
||||||
|
|
||||||
public void InitFeeds(int UserId, string[] feeds)
|
public void InitFeeds(int UserId, string[] feeds)
|
||||||
{
|
{
|
||||||
//Log.WriteInfo("InitFeeds {0} ", UserId);
|
|
||||||
|
|
||||||
string CACHE_KEY = GetKey_Feeds(UserId);
|
string CACHE_KEY = GetKey_Feeds(UserId);
|
||||||
|
|
||||||
if (_cache.Contains(CACHE_KEY))
|
if (_cache.Contains(CACHE_KEY))
|
||||||
|
@ -194,9 +187,16 @@ namespace WebsitePanel.Providers.Web.WPIWebApplicationGallery
|
||||||
List<Product> products = wpi.GetApplications(categoryId);
|
List<Product> products = wpi.GetApplications(categoryId);
|
||||||
List<GalleryApplication> applications = new List<GalleryApplication>();
|
List<GalleryApplication> applications = new List<GalleryApplication>();
|
||||||
|
|
||||||
foreach (Product product in products)
|
try
|
||||||
{
|
{
|
||||||
applications.Add(MakeGalleryApplicationFromProduct(product));
|
foreach (Product product in products)
|
||||||
|
{
|
||||||
|
applications.Add(MakeGalleryApplicationFromProduct(product));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch(Exception ex)
|
||||||
|
{
|
||||||
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
return applications;
|
return applications;
|
||||||
|
@ -381,7 +381,7 @@ namespace WebsitePanel.Providers.Web.WPIWebApplicationGallery
|
||||||
Id = product.ProductId,
|
Id = product.ProductId,
|
||||||
Title = product.Title,
|
Title = product.Title,
|
||||||
Author = new Author {Name = product.Author, Uri = product.AuthorUri.ToString()},
|
Author = new Author {Name = product.Author, Uri = product.AuthorUri.ToString()},
|
||||||
IconUrl = product.IconUrl.ToString(),
|
IconUrl = null == product.IconUrl ? "" : product.IconUrl.ToString(),
|
||||||
Version = product.Version,
|
Version = product.Version,
|
||||||
Description = product.LongDescription,
|
Description = product.LongDescription,
|
||||||
Summary = product.Summary,
|
Summary = product.Summary,
|
||||||
|
@ -399,6 +399,7 @@ namespace WebsitePanel.Providers.Web.WPIWebApplicationGallery
|
||||||
r.FriendlyName = d.FriendlyName;
|
r.FriendlyName = d.FriendlyName;
|
||||||
r.DefaultValue = d.DefaultValue;
|
r.DefaultValue = d.DefaultValue;
|
||||||
r.Description = d.Description;
|
r.Description = d.Description;
|
||||||
|
#pragma warning disable 612,618
|
||||||
r.WellKnownTags = (DeploymentParameterWellKnownTag) d.Tags;
|
r.WellKnownTags = (DeploymentParameterWellKnownTag) d.Tags;
|
||||||
if (null != d.Validation)
|
if (null != d.Validation)
|
||||||
{
|
{
|
||||||
|
@ -409,6 +410,7 @@ namespace WebsitePanel.Providers.Web.WPIWebApplicationGallery
|
||||||
{
|
{
|
||||||
r.ValidationKind = DeploymentParameterValidationKind.None;
|
r.ValidationKind = DeploymentParameterValidationKind.None;
|
||||||
}
|
}
|
||||||
|
#pragma warning restore 612,618
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,7 +71,8 @@ namespace WebsitePanel.Providers.Web
|
||||||
public const string WAG_XML_FEED_CACHE_KEY = "WAG_XML_FEED_CACHE_KEY";
|
public const string WAG_XML_FEED_CACHE_KEY = "WAG_XML_FEED_CACHE_KEY";
|
||||||
public const int WEB_APPLICATIONS_CACHE_STORE_MINUTES = 60;
|
public const int WEB_APPLICATIONS_CACHE_STORE_MINUTES = 60;
|
||||||
public const int XML_FEED_RECOVERY_ATTEMPTS = 10;
|
public const int XML_FEED_RECOVERY_ATTEMPTS = 10;
|
||||||
public const string WAG_DEFAULT_FEED_URL = "https://www.microsoft.com/web/webpi/3.0/WebApplicationList.xml";
|
// public const string WAG_DEFAULT_FEED_URL = "https://www.microsoft.com/web/webpi/3.0/WebApplicationList.xml";
|
||||||
|
public const string WAG_DEFAULT_FEED_URL = "https://www.microsoft.com/web/webpi/4.0/webapplicationlist.xml";
|
||||||
|
|
||||||
// well-known parameters matching
|
// well-known parameters matching
|
||||||
public readonly Dictionary<string, DeploymentParameterWellKnownTag> wellKnownParameters
|
public readonly Dictionary<string, DeploymentParameterWellKnownTag> wellKnownParameters
|
||||||
|
|
|
@ -70,10 +70,17 @@
|
||||||
<Reference Include="Microsoft.Web.Deployment, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Web.Deployment, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\Lib\References\Microsoft\Microsoft.Web.Deployment.dll</HintPath>
|
<HintPath>..\..\Lib\References\Microsoft\Microsoft.Web.Deployment.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Web.PlatformInstaller, Version=3.0.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Web.PlatformInstaller, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\Lib\Microsoft.Web.PlatformInstaller.dll</HintPath>
|
<HintPath>..\..\Lib\References\Microsoft\Microsoft.Web.PlatformInstaller.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.Web.PlatformInstaller.WebDeployShim, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>..\..\Lib\References\Microsoft\Microsoft.Web.PlatformInstaller.WebDeployShim.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using Microsoft.Web.PlatformInstaller;
|
using Microsoft.Web.PlatformInstaller;
|
||||||
|
@ -188,6 +189,8 @@ namespace WebsitePanel.Server.WPIService
|
||||||
{
|
{
|
||||||
_installationStatus = EWPIServiceStatus.InstallationComplete;
|
_installationStatus = EWPIServiceStatus.InstallationComplete;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CheckIISAlive();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -242,6 +245,27 @@ namespace WebsitePanel.Server.WPIService
|
||||||
_statusMessage = sb.ToString();
|
_statusMessage = sb.ToString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void CheckIISAlive()
|
||||||
|
{
|
||||||
|
// run iisreset /start
|
||||||
|
ProcessStartInfo processStartInfo = new ProcessStartInfo(@"C:\Windows\System32\iisreset.exe", "/start");
|
||||||
|
processStartInfo.UseShellExecute = false;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
using (Process exeProcess = Process.Start(processStartInfo))
|
||||||
|
{
|
||||||
|
exeProcess.WaitForExit();
|
||||||
|
Debug.Write("WPIService: iisreset /start returns "+exeProcess.ExitCode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Debug.Write("WPIService: iisreset /start exception: "+ex.ToString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
<RootNamespace>WebsitePanel.Server.WPIService</RootNamespace>
|
<RootNamespace>WebsitePanel.Server.WPIService</RootNamespace>
|
||||||
<AssemblyName>WebsitePanel.Server.WPIService</AssemblyName>
|
<AssemblyName>WebsitePanel.Server.WPIService</AssemblyName>
|
||||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||||
<TargetFrameworkProfile>
|
<TargetFrameworkProfile>
|
||||||
</TargetFrameworkProfile>
|
</TargetFrameworkProfile>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
|
@ -36,10 +36,17 @@
|
||||||
<Reference Include="Microsoft.Web.Deployment, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Web.Deployment, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\Lib\References\Microsoft\Microsoft.Web.Deployment.dll</HintPath>
|
<HintPath>..\..\Lib\References\Microsoft\Microsoft.Web.Deployment.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Web.PlatformInstaller, Version=3.0.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Web.PlatformInstaller, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\Lib\Microsoft.Web.PlatformInstaller.dll</HintPath>
|
<HintPath>..\..\Lib\References\Microsoft\Microsoft.Web.PlatformInstaller.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.Web.PlatformInstaller.WebDeployShim, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>..\..\Lib\References\Microsoft\Microsoft.Web.PlatformInstaller.WebDeployShim.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Runtime.Remoting" />
|
<Reference Include="System.Runtime.Remoting" />
|
||||||
|
@ -61,6 +68,9 @@
|
||||||
<Name>WebsitePanel.Server.WPIServiceContract</Name>
|
<Name>WebsitePanel.Server.WPIServiceContract</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="app.config" />
|
||||||
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<PostBuildEvent>
|
<PostBuildEvent>
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<configuration>
|
||||||
|
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup> <runtime>
|
||||||
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="Microsoft.Web.Deployment" publicKeyToken="31BF3856AD364E35" culture="neutral"/>
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0"/>
|
||||||
|
</dependentAssembly>
|
||||||
|
</assemblyBinding>
|
||||||
|
</runtime>
|
||||||
|
</configuration>
|
|
@ -60,7 +60,8 @@ namespace WebsitePanel.Server.Code
|
||||||
|
|
||||||
private readonly List<string> _feeds;
|
private readonly List<string> _feeds;
|
||||||
private string _webPIinstallersFolder;
|
private string _webPIinstallersFolder;
|
||||||
private const string MainWpiFeed = "https://www.microsoft.com/web/webpi/3.0/webproductlist.xml";
|
//private const string MainWpiFeed = "https://www.microsoft.com/web/webpi/3.0/webproductlist.xml";
|
||||||
|
private const string MainWpiFeed = "https://www.microsoft.com/web/webpi/4.0/WebProductList.xml";
|
||||||
private const string IisChoiceProduct = "StaticContent";
|
private const string IisChoiceProduct = "StaticContent";
|
||||||
private const string WebMatrixChoiceProduct = "WebMatrix";
|
private const string WebMatrixChoiceProduct = "WebMatrix";
|
||||||
private ProductManager _productManager;
|
private ProductManager _productManager;
|
||||||
|
@ -682,9 +683,11 @@ namespace WebsitePanel.Server.Code
|
||||||
|
|
||||||
private static bool IsAlienDbTaggedParameter(DeploymentWellKnownTag dbTag, DeclaredParameter parameter)
|
private static bool IsAlienDbTaggedParameter(DeploymentWellKnownTag dbTag, DeclaredParameter parameter)
|
||||||
{
|
{
|
||||||
|
#pragma warning disable 612,618
|
||||||
return (parameter.Tags & databaseEngineTags) != DeploymentWellKnownTag.None
|
return (parameter.Tags & databaseEngineTags) != DeploymentWellKnownTag.None
|
||||||
&&
|
&&
|
||||||
(parameter.Tags & dbTag) == DeploymentWellKnownTag.None;
|
(parameter.Tags & dbTag) == DeploymentWellKnownTag.None;
|
||||||
|
#pragma warning restore 612,618
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void RemoveUnusedProviders(MSDeployPackage msDeployPackage, DeploymentWellKnownTag dbTag)
|
private static void RemoveUnusedProviders(MSDeployPackage msDeployPackage, DeploymentWellKnownTag dbTag)
|
||||||
|
|
|
@ -45,10 +45,17 @@
|
||||||
<Reference Include="Microsoft.Web.Deployment, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Web.Deployment, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\Lib\References\Microsoft\Microsoft.Web.Deployment.dll</HintPath>
|
<HintPath>..\..\Lib\References\Microsoft\Microsoft.Web.Deployment.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Web.PlatformInstaller, Version=3.0.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Web.PlatformInstaller, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\Lib\Microsoft.Web.PlatformInstaller.dll</HintPath>
|
<HintPath>..\..\Lib\References\Microsoft\Microsoft.Web.PlatformInstaller.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.Web.PlatformInstaller.WebDeployShim, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>..\..\Lib\References\Microsoft\Microsoft.Web.PlatformInstaller.WebDeployShim.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
|
|
@ -31,6 +31,7 @@ using System.IO;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Security;
|
using System.Security;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
@ -39,7 +40,6 @@ using System.Collections.Generic;
|
||||||
using System.Web.Services;
|
using System.Web.Services;
|
||||||
using System.Web.Services.Protocols;
|
using System.Web.Services.Protocols;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Text.RegularExpressions;
|
|
||||||
using System.ServiceProcess;
|
using System.ServiceProcess;
|
||||||
using System.ServiceModel;
|
using System.ServiceModel;
|
||||||
using System.Runtime.Remoting;
|
using System.Runtime.Remoting;
|
||||||
|
@ -56,6 +56,11 @@ using WebsitePanel.Providers;
|
||||||
using WebsitePanel.Server.WPIService;
|
using WebsitePanel.Server.WPIService;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
namespace WebsitePanel.Server
|
namespace WebsitePanel.Server
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -615,31 +620,35 @@ namespace WebsitePanel.Server
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void StartWpiService()
|
private void StartWpiService()
|
||||||
{
|
{
|
||||||
string binFolder = HttpContext.Current.Server.MapPath("/bin/");
|
string binFolder = HttpContext.Current.Server.MapPath("/bin/");
|
||||||
|
string workingDirectory = Path.Combine(Environment.ExpandEnvironmentVariables("%SystemRoot%"), "Temp\\zoo.wpi");
|
||||||
|
|
||||||
string newUserProfile = Path.Combine(Environment.ExpandEnvironmentVariables("%SystemRoot%"), "Temp\\zoo.wpi");
|
//string newUserProfile = Path.Combine(Environment.ExpandEnvironmentVariables("%SystemRoot%"), "Temp\\zoo.wpi");
|
||||||
string newAppData = Path.Combine(newUserProfile, "Roaming");
|
//string newAppData = Path.Combine(newUserProfile, "Roaming");
|
||||||
string newLocalAppData = Path.Combine(newUserProfile, "Local");
|
//string newLocalAppData = Path.Combine(newUserProfile, "Local");
|
||||||
try
|
//try
|
||||||
{
|
//{
|
||||||
Directory.CreateDirectory(newUserProfile);
|
// Directory.CreateDirectory(newUserProfile);
|
||||||
Directory.CreateDirectory(newAppData);
|
// Directory.CreateDirectory(newAppData);
|
||||||
Directory.CreateDirectory(newLocalAppData);
|
// Directory.CreateDirectory(newLocalAppData);
|
||||||
}
|
//}
|
||||||
catch (Exception)
|
//catch (Exception)
|
||||||
{
|
//{
|
||||||
//throw;
|
// //throw;
|
||||||
}
|
//}
|
||||||
|
|
||||||
|
|
||||||
Process wpiServiceExe = new Process();
|
Process wpiServiceExe = new Process();
|
||||||
wpiServiceExe.StartInfo = new ProcessStartInfo(Path.Combine(binFolder, "WebsitePanel.Server.WPIService.exe"));
|
wpiServiceExe.StartInfo = new ProcessStartInfo(Path.Combine(binFolder, "WebsitePanel.Server.WPIService.exe"));
|
||||||
|
wpiServiceExe.StartInfo.WorkingDirectory = workingDirectory;
|
||||||
wpiServiceExe.StartInfo.UseShellExecute = false;
|
wpiServiceExe.StartInfo.UseShellExecute = false;
|
||||||
wpiServiceExe.StartInfo.EnvironmentVariables["UserProfile"] = newUserProfile;
|
wpiServiceExe.StartInfo.LoadUserProfile = true;
|
||||||
wpiServiceExe.StartInfo.EnvironmentVariables["LocalAppData"] = newLocalAppData;
|
//wpiServiceExe.StartInfo.EnvironmentVariables["UserProfile"] = newUserProfile;
|
||||||
wpiServiceExe.StartInfo.EnvironmentVariables["AppData"] = newAppData;
|
//wpiServiceExe.StartInfo.EnvironmentVariables["LocalAppData"] = newLocalAppData;
|
||||||
|
//wpiServiceExe.StartInfo.EnvironmentVariables["AppData"] = newAppData;
|
||||||
if (wpiServiceExe.Start())
|
if (wpiServiceExe.Start())
|
||||||
{
|
{
|
||||||
_WpiServiceExe = wpiServiceExe;
|
_WpiServiceExe = wpiServiceExe;
|
||||||
|
@ -740,12 +749,13 @@ namespace WebsitePanel.Server
|
||||||
|
|
||||||
Log.WriteError("WpiGetLogFileDirectory", ex);
|
Log.WriteError("WpiGetLogFileDirectory", ex);
|
||||||
|
|
||||||
throw;
|
//throw;
|
||||||
|
return string.Empty;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[WebMethod]
|
[WebMethod]
|
||||||
public SettingPair[] WpiGetLogsInDirectory(string Path)
|
public SettingPair[] WpiGetLogsInDirectory(string path)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -753,7 +763,7 @@ namespace WebsitePanel.Server
|
||||||
|
|
||||||
ArrayList result = new ArrayList();
|
ArrayList result = new ArrayList();
|
||||||
|
|
||||||
string[] filePaths = Directory.GetFiles(Path);
|
string[] filePaths = Directory.GetFiles(path);
|
||||||
foreach (string filePath in filePaths)
|
foreach (string filePath in filePaths)
|
||||||
{
|
{
|
||||||
using (StreamReader streamReader = new StreamReader(filePath))
|
using (StreamReader streamReader = new StreamReader(filePath))
|
||||||
|
@ -773,7 +783,8 @@ namespace WebsitePanel.Server
|
||||||
|
|
||||||
Log.WriteError("WpiGetLogFileDirectory", ex);
|
Log.WriteError("WpiGetLogFileDirectory", ex);
|
||||||
|
|
||||||
throw;
|
//throw;
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -981,4 +992,6 @@ namespace WebsitePanel.Server
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -187,7 +187,7 @@
|
||||||
<value>Applications Installer</value>
|
<value>Applications Installer</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ModuleTitle.WebApplicationsGallery" xml:space="preserve">
|
<data name="ModuleTitle.WebApplicationsGallery" xml:space="preserve">
|
||||||
<value>Microsoft Web Application Gallery</value>
|
<value>Web Application Gallery</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ModuleTitle.AuditLog" xml:space="preserve">
|
<data name="ModuleTitle.AuditLog" xml:space="preserve">
|
||||||
<value>Audit Log</value>
|
<value>Audit Log</value>
|
||||||
|
|
|
@ -445,7 +445,7 @@
|
||||||
<value>{user} - {space} - Web Site IP Addresses</value>
|
<value>{user} - {space} - Web Site IP Addresses</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="PageTitle.SpaceWebApplicationsGallery" xml:space="preserve">
|
<data name="PageTitle.SpaceWebApplicationsGallery" xml:space="preserve">
|
||||||
<value>{user} - {space} - Microsoft Web Application Gallery</value>
|
<value>{user} - {space} - Web Application Gallery</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="PageName.SpaceWeb" xml:space="preserve">
|
<data name="PageName.SpaceWeb" xml:space="preserve">
|
||||||
<value>Web</value>
|
<value>Web</value>
|
||||||
|
|
|
@ -327,7 +327,10 @@ namespace WebsitePanel.Portal
|
||||||
if (string.IsNullOrEmpty(wpiLogsDir))
|
if (string.IsNullOrEmpty(wpiLogsDir))
|
||||||
{
|
{
|
||||||
wpiLogsDir = ES.Services.Servers.WpiGetLogFileDirectory(PanelRequest.ServerId);
|
wpiLogsDir = ES.Services.Servers.WpiGetLogFileDirectory(PanelRequest.ServerId);
|
||||||
ViewState[_wpiLogsDirViewStateKey] = wpiLogsDir;
|
if (!string.IsNullOrEmpty(wpiLogsDir))
|
||||||
|
{
|
||||||
|
ViewState[_wpiLogsDirViewStateKey] = wpiLogsDir;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
|
@ -532,37 +535,51 @@ namespace WebsitePanel.Portal
|
||||||
protected void ShowLogsButton_OnClick(object sender, EventArgs e)
|
protected void ShowLogsButton_OnClick(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
//show logs
|
//show logs
|
||||||
|
|
||||||
|
string wpiLogsDir = null;
|
||||||
|
object[] logsEntrys = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
string wpiLogsDir = ViewState[_wpiLogsDirViewStateKey] as string;
|
wpiLogsDir = ViewState[_wpiLogsDirViewStateKey] as string;
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(wpiLogsDir))
|
if (!string.IsNullOrEmpty(wpiLogsDir))
|
||||||
{
|
{
|
||||||
//Get logs !!!
|
//Get logs !!!
|
||||||
object[] logsEntrys = ES.Services.Servers.WpiGetLogsInDirectory(PanelRequest.ServerId, wpiLogsDir);
|
logsEntrys = ES.Services.Servers.WpiGetLogsInDirectory(PanelRequest.ServerId, wpiLogsDir);
|
||||||
|
|
||||||
WpiLogsPanel.Visible = true;
|
if (null == logsEntrys)
|
||||||
|
|
||||||
StringBuilder sb = new StringBuilder();
|
|
||||||
|
|
||||||
foreach (SettingPair entry in logsEntrys)
|
|
||||||
{
|
{
|
||||||
string fileName = (string)entry.Name;
|
WpiLogsPanel.Visible = true;
|
||||||
string fileContent = (string)entry.Value;
|
string msg = string.Format("Could not get logs files. Log files folder:\n{0}", wpiLogsDir);
|
||||||
sb.AppendLine().AppendFormat("<h3>{0}</h3>", fileName).AppendLine().Append(fileContent).AppendLine();
|
WpiLogsPre.InnerText = msg;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
WpiLogsPanel.Visible = true;
|
||||||
|
|
||||||
WpiLogsPre.InnerHtml = sb.ToString();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
ShowLogsButton.Visible = false;
|
foreach (SettingPair entry in logsEntrys)
|
||||||
ProgressTimer.Enabled = false;
|
{
|
||||||
|
string fileName = (string) entry.Name;
|
||||||
|
string fileContent = (string) entry.Value;
|
||||||
|
sb.AppendLine().AppendFormat("<h3>{0}</h3>", fileName).AppendLine().Append(fileContent).
|
||||||
|
AppendLine();
|
||||||
|
}
|
||||||
|
|
||||||
|
WpiLogsPre.InnerHtml = sb.ToString();
|
||||||
|
|
||||||
|
ShowLogsButton.Visible = false;
|
||||||
|
ProgressTimer.Enabled = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
WpiLogsPanel.Visible = true;
|
WpiLogsPanel.Visible = true;
|
||||||
WpiLogsPre.InnerText = ex.ToString();
|
string msg = string.Format("wpiLogsDir: {0}\nlogsEntrys is null: {1}\n{2}", wpiLogsDir, logsEntrys == null, ex);
|
||||||
|
WpiLogsPre.InnerText = msg;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -123,7 +123,7 @@ ul.WPIKeywordList>li {
|
||||||
<asp:hyperlink NavigateUrl='<%# EditUrl("ApplicationID", Eval("Id").ToString(), "edit", "SpaceID=" + PanelSecurity.PackageId.ToString()) %>'
|
<asp:hyperlink NavigateUrl='<%# EditUrl("ApplicationID", Eval("Id").ToString(), "edit", "SpaceID=" + PanelSecurity.PackageId.ToString()) %>'
|
||||||
runat="server" ID="Hyperlink3" ToolTip='<%# Eval("Title") %>'>
|
runat="server" ID="Hyperlink3" ToolTip='<%# Eval("Title") %>'>
|
||||||
<asp:Image runat="server" ID="Image1" Width="120" Height="120"
|
<asp:Image runat="server" ID="Image1" Width="120" Height="120"
|
||||||
ImageUrl='<%# "~/DesktopModules/WebsitePanel/ResizeImage.ashx?width=120&height=120&url=" + Server.UrlEncode((string)Eval("IconUrl")) %>'
|
ImageUrl='<%# GetIconUrlOrDefault((string)Eval("IconUrl")) %>'
|
||||||
AlternateText='<%# Eval("Title") %>'>
|
AlternateText='<%# Eval("Title") %>'>
|
||||||
</asp:Image>
|
</asp:Image>
|
||||||
</asp:hyperlink>
|
</asp:hyperlink>
|
||||||
|
|
|
@ -178,5 +178,15 @@ namespace WebsitePanel.Portal
|
||||||
}
|
}
|
||||||
ES.Services.WebApplicationGallery.SetResourceLanguage(PanelSecurity.PackageId, lang);
|
ES.Services.WebApplicationGallery.SetResourceLanguage(PanelSecurity.PackageId, lang);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected string GetIconUrlOrDefault(string url)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(url))
|
||||||
|
{
|
||||||
|
return "/App_Themes/Default/icons/sphere_128.png";
|
||||||
|
}
|
||||||
|
|
||||||
|
return "~/DesktopModules/WebsitePanel/ResizeImage.ashx?width=120&height=120&url=" + Server.UrlEncode(url);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue