merge commit
This commit is contained in:
commit
465731273a
21 changed files with 739 additions and 263 deletions
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load diff
|
@ -33,6 +33,7 @@ using System.Data.SqlClient;
|
|||
using System.Text.RegularExpressions;
|
||||
using WebsitePanel.Providers.HostedSolution;
|
||||
using Microsoft.ApplicationBlocks.Data;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace WebsitePanel.EnterpriseServer
|
||||
{
|
||||
|
@ -3399,5 +3400,45 @@ namespace WebsitePanel.EnterpriseServer
|
|||
|
||||
#endregion
|
||||
|
||||
public static int GetPackageIdByName(string Name)
|
||||
{
|
||||
// get Helicon Zoo provider
|
||||
int packageId = -1;
|
||||
List<ProviderInfo> providers = ServerController.GetProviders();
|
||||
foreach (ProviderInfo providerInfo in providers)
|
||||
{
|
||||
if (string.Equals(Name, providerInfo.ProviderName, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
packageId = providerInfo.ProviderId;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (-1 == packageId)
|
||||
{
|
||||
throw new Exception("Provider not found");
|
||||
}
|
||||
|
||||
return packageId;
|
||||
}
|
||||
|
||||
public static int GetServiceIdByProviderForServer(int providerId, int serverId)
|
||||
{
|
||||
IDataReader reader = SqlHelper.ExecuteReader(ConnectionString, CommandType.Text,
|
||||
@"SELECT TOP 1
|
||||
ServiceID
|
||||
FROM Services
|
||||
WHERE ProviderID = @ProviderID AND ServerID = @ServerID",
|
||||
new SqlParameter("@ProviderID", providerId),
|
||||
new SqlParameter("@ServerID", serverId));
|
||||
|
||||
if (reader.Read())
|
||||
{
|
||||
return (int)reader["ServiceID"];
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,6 +41,7 @@ using WebsitePanel.Providers.OS;
|
|||
using OS = WebsitePanel.Providers.OS;
|
||||
using System.Collections;
|
||||
|
||||
|
||||
namespace WebsitePanel.EnterpriseServer
|
||||
{
|
||||
public class OperatingSystemController : IImportController, IBackupController
|
||||
|
@ -409,6 +410,23 @@ namespace WebsitePanel.EnterpriseServer
|
|||
|
||||
#region Web Platform Installer
|
||||
|
||||
public static bool CheckLoadUserProfile(int serverId)
|
||||
{
|
||||
int packageId = DataProvider.GetPackageIdByName("IIS70");
|
||||
int serviceId = DataProvider.GetServiceIdByProviderForServer(packageId, serverId);
|
||||
return WebServerController.GetWebServer(serviceId).CheckLoadUserProfile();
|
||||
|
||||
}
|
||||
|
||||
public static void EnableLoadUserProfile(int serverId)
|
||||
{
|
||||
int packageId = DataProvider.GetPackageIdByName("IIS70");
|
||||
int serviceId = DataProvider.GetServiceIdByProviderForServer(packageId, serverId);
|
||||
WebServerController.GetWebServer(serviceId).EnableLoadUserProfile();
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static void InitWPIFeeds(int serverId, string feedUrls)
|
||||
{
|
||||
GetServerService(serverId).InitWPIFeeds(feedUrls);
|
||||
|
@ -746,6 +764,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
</configSections>
|
||||
<!-- Connection strings -->
|
||||
<connectionStrings>
|
||||
<add name="EnterpriseServer" connectionString="server=HSTPROV01;database=WebsitePanelMerge;uid=WebsitePanel;pwd=aj7ep6fyhmw3b5qeth7c;" providerName="System.Data.SqlClient" />
|
||||
<add name="EnterpriseServer" connectionString="Server=(local)\SQLExpress;Database=WebsitePanel;uid=WebsitePanel;pwd=Password12" providerName="System.Data.SqlClient" />
|
||||
</connectionStrings>
|
||||
<appSettings>
|
||||
<!-- Encryption util settings -->
|
||||
<add key="WebsitePanel.CryptoKey" value="3x7eqt7zabc5n5afs6dg" />
|
||||
<add key="WebsitePanel.CryptoKey" value="1234567890" />
|
||||
<!-- A1D4KDHUE83NKHddF -->
|
||||
<add key="WebsitePanel.EncryptionEnabled" value="true" />
|
||||
<!-- Web Applications -->
|
||||
|
|
|
@ -670,6 +670,20 @@ namespace WebsitePanel.EnterpriseServer
|
|||
|
||||
#region Web Platform Installer
|
||||
|
||||
[WebMethod]
|
||||
public bool CheckLoadUserProfile(int serverId)
|
||||
{
|
||||
return OperatingSystemController.CheckLoadUserProfile(serverId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public void EnableLoadUserProfile(int serverId)
|
||||
{
|
||||
OperatingSystemController.EnableLoadUserProfile(serverId);
|
||||
}
|
||||
|
||||
|
||||
|
||||
[WebMethod]
|
||||
public void InitWPIFeeds(int serverId)
|
||||
{
|
||||
|
|
|
@ -119,6 +119,8 @@ namespace WebsitePanel.Providers.Web
|
|||
|
||||
|
||||
// web app gallery
|
||||
bool CheckLoadUserProfile();
|
||||
void EnableLoadUserProfile();
|
||||
void InitFeeds(int UserId, string[] feeds);
|
||||
void SetResourceLanguage(int UserId, string resourceLanguage);
|
||||
bool IsMsDeployInstalled();
|
||||
|
@ -153,5 +155,7 @@ namespace WebsitePanel.Providers.Web
|
|||
ResultObject DeleteCertificate(SSLCertificate certificate, WebSite website);
|
||||
SSLCertificate ImportCertificate(WebSite website);
|
||||
bool CheckCertificate(WebSite webSite);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -87,7 +87,7 @@ namespace WebsitePanel.Providers.WebAppGallery
|
|||
//SiteUserPassword = 549755813888,
|
||||
|
||||
|
||||
ALLKNOWN =
|
||||
AllKnown =
|
||||
AppHostConfig |
|
||||
AppPoolConfig |
|
||||
Boolean |
|
||||
|
@ -155,5 +155,21 @@ namespace WebsitePanel.Providers.WebAppGallery
|
|||
return String.Format("{0}=\"{1}\", Tags={2}", Name, Value, WellKnownTags.ToString());
|
||||
}
|
||||
#endif
|
||||
|
||||
public void SetWellKnownTagsFromRawString(string rawTags)
|
||||
{
|
||||
string[] tags = rawTags.Split(new[] {','}, StringSplitOptions.RemoveEmptyEntries);
|
||||
DeploymentParameterWellKnownTag wellKnownTags = DeploymentParameterWellKnownTag.None;
|
||||
foreach (string tag in tags)
|
||||
{
|
||||
try
|
||||
{
|
||||
wellKnownTags |= (DeploymentParameterWellKnownTag)Enum.Parse(typeof(DeploymentParameterWellKnownTag), tag, true);
|
||||
}
|
||||
catch(Exception){}
|
||||
}
|
||||
|
||||
WellKnownTags = wellKnownTags & DeploymentParameterWellKnownTag.AllKnown;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4042,6 +4042,26 @@ namespace WebsitePanel.Providers.Web
|
|||
|
||||
// moved down to IIs60
|
||||
|
||||
override public bool CheckLoadUserProfile()
|
||||
{
|
||||
using (var srvman = new ServerManager())
|
||||
{
|
||||
return srvman.ApplicationPools["WebsitePanel Server"].ProcessModel.LoadUserProfile;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
override public void EnableLoadUserProfile()
|
||||
{
|
||||
using (var srvman = new ServerManager())
|
||||
{
|
||||
srvman.ApplicationPools["WebsitePanel Server"].ProcessModel.LoadUserProfile = true;
|
||||
// save changes
|
||||
srvman.CommitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3394,6 +3394,18 @@ namespace WebsitePanel.Providers.Web
|
|||
private const string WPI_INSTANCE_VIEWER = "viewer";
|
||||
private const string WPI_INSTANCE_INSTALLER = "installer";
|
||||
|
||||
virtual public bool CheckLoadUserProfile()
|
||||
{
|
||||
throw new NotImplementedException("LoadUserProfile option valid only on IIS7 or higer");
|
||||
}
|
||||
|
||||
virtual public void EnableLoadUserProfile()
|
||||
{
|
||||
throw new NotImplementedException("LoadUserProfile option valid only on IIS7 or higer");
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void InitFeeds(int UserId, string[] feeds)
|
||||
{
|
||||
//need to call InitFeeds() before any operation with WPIApplicationGallery()
|
||||
|
@ -3667,5 +3679,10 @@ namespace WebsitePanel.Providers.Web
|
|||
throw new NotSupportedException();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,6 +44,7 @@ using System.Web;
|
|||
using System.Diagnostics;
|
||||
using Microsoft.Practices.EnterpriseLibrary.Caching.Expirations;
|
||||
using DeploymentParameter = WebsitePanel.Providers.WebAppGallery.DeploymentParameter;
|
||||
using DeploymentParameterWPI = Microsoft.Web.PlatformInstaller.DeploymentParameter;
|
||||
|
||||
namespace WebsitePanel.Providers.Web.WPIWebApplicationGallery
|
||||
{
|
||||
|
@ -268,10 +269,10 @@ namespace WebsitePanel.Providers.Web.WPIWebApplicationGallery
|
|||
|
||||
Product product = wpi.GetProduct(id);
|
||||
List<DeploymentParameter> deploymentParameters = new List<DeploymentParameter>();
|
||||
IList<DeclaredParameter> appDecalredParameters = wpi.GetAppDecalredParameters(id);
|
||||
foreach (DeclaredParameter declaredParameter in appDecalredParameters)
|
||||
IList<DeploymentParameterWPI> appDeploymentWPIParameters = wpi.GetAppDecalredParameters(id);
|
||||
foreach (DeploymentParameterWPI deploymentParameter in appDeploymentWPIParameters)
|
||||
{
|
||||
deploymentParameters.Add(MakeDeploymentParameterFromDecalredParameter(declaredParameter));
|
||||
deploymentParameters.Add(MakeDeploymentParameterFromDecalredParameter(deploymentParameter));
|
||||
}
|
||||
|
||||
return deploymentParameters;
|
||||
|
@ -398,28 +399,41 @@ namespace WebsitePanel.Providers.Web.WPIWebApplicationGallery
|
|||
};
|
||||
}
|
||||
|
||||
protected static DeploymentParameter MakeDeploymentParameterFromDecalredParameter(DeclaredParameter d)
|
||||
protected static DeploymentParameter MakeDeploymentParameterFromDecalredParameter(DeploymentParameterWPI d)
|
||||
{
|
||||
|
||||
|
||||
DeploymentParameter r = new DeploymentParameter();
|
||||
r.Name = d.Name;
|
||||
r.FriendlyName = d.FriendlyName;
|
||||
r.DefaultValue = d.DefaultValue;
|
||||
r.Description = d.Description;
|
||||
|
||||
#pragma warning disable 612,618
|
||||
r.WellKnownTags = DeploymentParameterWellKnownTag.ALLKNOWN & (DeploymentParameterWellKnownTag) d.Tags;
|
||||
if (null != d.Validation)
|
||||
r.SetWellKnownTagsFromRawString(d.RawTags);
|
||||
if (!string.IsNullOrEmpty(d.ValidationString))
|
||||
{
|
||||
r.ValidationKind = (DeploymentParameterValidationKind) d.Validation.Kind;
|
||||
r.ValidationString = d.Validation.ValidationString;
|
||||
// synchronized with Microsoft.Web.Deployment.DeploymentSyncParameterValidationKind
|
||||
if (d.HasValidation((int)DeploymentParameterValidationKind.AllowEmpty))
|
||||
{
|
||||
r.ValidationKind |= DeploymentParameterValidationKind.AllowEmpty;
|
||||
}
|
||||
if (d.HasValidation((int)DeploymentParameterValidationKind.RegularExpression))
|
||||
{
|
||||
r.ValidationKind |= DeploymentParameterValidationKind.RegularExpression;
|
||||
}
|
||||
if (d.HasValidation((int)DeploymentParameterValidationKind.Enumeration))
|
||||
{
|
||||
r.ValidationKind |= DeploymentParameterValidationKind.Enumeration;
|
||||
}
|
||||
if (d.HasValidation((int)DeploymentParameterValidationKind.Boolean))
|
||||
{
|
||||
r.ValidationKind |= DeploymentParameterValidationKind.Boolean;
|
||||
}
|
||||
|
||||
r.ValidationString = d.ValidationString;
|
||||
}
|
||||
else
|
||||
{
|
||||
r.ValidationKind = DeploymentParameterValidationKind.None;
|
||||
}
|
||||
#pragma warning restore 612,618
|
||||
|
||||
return r;
|
||||
}
|
||||
|
|
|
@ -77,11 +77,6 @@
|
|||
<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 Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.DirectoryServices" />
|
||||
|
|
|
@ -1,8 +1,3 @@
|
|||
// Copyright (c) 2012, Outercurve Foundation.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// - Redistributions of source code must retain the above copyright notice, this
|
||||
// list of conditions and the following disclaimer.
|
||||
|
@ -50,6 +45,7 @@ namespace WebsitePanel.Providers.Web
|
|||
using WebsitePanel.Providers.ResultObjects;
|
||||
using WebsitePanel.Providers.WebAppGallery;
|
||||
using WebsitePanel.Providers.Common;
|
||||
|
||||
|
||||
|
||||
/// <remarks/>
|
||||
|
@ -180,6 +176,10 @@ namespace WebsitePanel.Providers.Web
|
|||
|
||||
private System.Threading.SendOrPostCallback DeleteHeliconApeGroupOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback CheckLoadUserProfileOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback EnableLoadUserProfileOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback InitFeedsOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback SetResourceLanguageOperationCompleted;
|
||||
|
@ -416,6 +416,12 @@ namespace WebsitePanel.Providers.Web
|
|||
/// <remarks/>
|
||||
public event DeleteHeliconApeGroupCompletedEventHandler DeleteHeliconApeGroupCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event CheckLoadUserProfileCompletedEventHandler CheckLoadUserProfileCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event EnableLoadUserProfileCompletedEventHandler EnableLoadUserProfileCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event InitFeedsCompletedEventHandler InitFeedsCompleted;
|
||||
|
||||
|
@ -3005,6 +3011,82 @@ namespace WebsitePanel.Providers.Web
|
|||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CheckLoadUserProfile", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public bool CheckLoadUserProfile() {
|
||||
object[] results = this.Invoke("CheckLoadUserProfile", new object[0]);
|
||||
return ((bool)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginCheckLoadUserProfile(System.AsyncCallback callback, object asyncState) {
|
||||
return this.BeginInvoke("CheckLoadUserProfile", new object[0], callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public bool EndCheckLoadUserProfile(System.IAsyncResult asyncResult) {
|
||||
object[] results = this.EndInvoke(asyncResult);
|
||||
return ((bool)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void CheckLoadUserProfileAsync() {
|
||||
this.CheckLoadUserProfileAsync(null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void CheckLoadUserProfileAsync(object userState) {
|
||||
if ((this.CheckLoadUserProfileOperationCompleted == null)) {
|
||||
this.CheckLoadUserProfileOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCheckLoadUserProfileOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("CheckLoadUserProfile", new object[0], this.CheckLoadUserProfileOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnCheckLoadUserProfileOperationCompleted(object arg) {
|
||||
if ((this.CheckLoadUserProfileCompleted != null)) {
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.CheckLoadUserProfileCompleted(this, new CheckLoadUserProfileCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/EnableLoadUserProfile", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public void EnableLoadUserProfile() {
|
||||
this.Invoke("EnableLoadUserProfile", new object[0]);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginEnableLoadUserProfile(System.AsyncCallback callback, object asyncState) {
|
||||
return this.BeginInvoke("EnableLoadUserProfile", new object[0], callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void EndEnableLoadUserProfile(System.IAsyncResult asyncResult) {
|
||||
this.EndInvoke(asyncResult);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void EnableLoadUserProfileAsync() {
|
||||
this.EnableLoadUserProfileAsync(null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void EnableLoadUserProfileAsync(object userState) {
|
||||
if ((this.EnableLoadUserProfileOperationCompleted == null)) {
|
||||
this.EnableLoadUserProfileOperationCompleted = new System.Threading.SendOrPostCallback(this.OnEnableLoadUserProfileOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("EnableLoadUserProfile", new object[0], this.EnableLoadUserProfileOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnEnableLoadUserProfileOperationCompleted(object arg) {
|
||||
if ((this.EnableLoadUserProfileCompleted != null)) {
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.EnableLoadUserProfileCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/InitFeeds", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
|
@ -5064,6 +5146,36 @@ namespace WebsitePanel.Providers.Web
|
|||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
public delegate void DeleteHeliconApeGroupCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
public delegate void CheckLoadUserProfileCompletedEventHandler(object sender, CheckLoadUserProfileCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class CheckLoadUserProfileCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||
|
||||
private object[] results;
|
||||
|
||||
internal CheckLoadUserProfileCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||
base(exception, cancelled, userState) {
|
||||
this.results = results;
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public bool Result {
|
||||
get {
|
||||
this.RaiseExceptionIfNecessary();
|
||||
return ((bool)(this.results[0]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
public delegate void EnableLoadUserProfileCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
public delegate void InitFeedsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
|
||||
|
|
|
@ -38,6 +38,7 @@ using System.Threading;
|
|||
using Microsoft.Web.Deployment;
|
||||
using Microsoft.Web.PlatformInstaller;
|
||||
using Installer = Microsoft.Web.PlatformInstaller.Installer;
|
||||
using DeploymentParameterWPI = Microsoft.Web.PlatformInstaller.DeploymentParameter;
|
||||
|
||||
namespace WebsitePanel.Server.Code
|
||||
{
|
||||
|
@ -453,11 +454,11 @@ namespace WebsitePanel.Server.Code
|
|||
return products;
|
||||
}
|
||||
|
||||
public IList<DeclaredParameter> GetAppDecalredParameters(string productId)
|
||||
public IList<DeploymentParameterWPI> GetAppDecalredParameters(string productId)
|
||||
{
|
||||
Product app = _productManager.GetProduct(productId);
|
||||
Installer appInstaller = app.GetInstaller(GetLanguage(null));
|
||||
return appInstaller.MSDeployPackage.DeclaredParameters;
|
||||
return appInstaller.MSDeployPackage.DeploymentParameters;
|
||||
}
|
||||
|
||||
public bool InstallApplication(
|
||||
|
@ -501,7 +502,7 @@ namespace WebsitePanel.Server.Code
|
|||
DeploymentWellKnownTag dbTag = (DeploymentWellKnownTag)GetDbTag(updatedValues);
|
||||
|
||||
// remove parameters with alien db tags
|
||||
foreach (DeclaredParameter parameter in appInstaller.MSDeployPackage.DeclaredParameters)
|
||||
foreach (DeploymentParameterWPI parameter in appInstaller.MSDeployPackage.DeploymentParameters)
|
||||
{
|
||||
if (IsAlienDbTaggedParameter(dbTag, parameter))
|
||||
{
|
||||
|
@ -726,13 +727,16 @@ namespace WebsitePanel.Server.Code
|
|||
return DeploymentWellKnownTag.None;
|
||||
}
|
||||
|
||||
private static bool IsAlienDbTaggedParameter(DeploymentWellKnownTag dbTag, DeclaredParameter parameter)
|
||||
private static bool IsAlienDbTaggedParameter(DeploymentWellKnownTag dbTag, DeploymentParameterWPI parameter)
|
||||
{
|
||||
return parameter.HasTags((long)databaseEngineTags) && !parameter.HasTags((long)dbTag);
|
||||
/*
|
||||
#pragma warning disable 612,618
|
||||
return (parameter.Tags & databaseEngineTags) != DeploymentWellKnownTag.None
|
||||
&&
|
||||
(parameter.Tags & dbTag) == DeploymentWellKnownTag.None;
|
||||
#pragma warning restore 612,618
|
||||
*/
|
||||
}
|
||||
|
||||
private static void RemoveUnusedProviders(MSDeployPackage msDeployPackage, DeploymentWellKnownTag dbTag)
|
||||
|
|
|
@ -1061,6 +1061,42 @@ namespace WebsitePanel.Server
|
|||
#endregion
|
||||
|
||||
#region Web Application Gallery
|
||||
|
||||
[WebMethod, SoapHeader("settings")]
|
||||
public bool CheckLoadUserProfile()
|
||||
{
|
||||
try
|
||||
{
|
||||
Log.WriteStart("CheckLoadUserProfile");
|
||||
|
||||
return WebProvider.CheckLoadUserProfile();
|
||||
|
||||
Log.WriteEnd("CheckLoadUserProfile");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteError("CheckLoadUserProfile", ex);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
[WebMethod, SoapHeader("settings")]
|
||||
public void EnableLoadUserProfile()
|
||||
{
|
||||
try
|
||||
{
|
||||
Log.WriteStart("EnableLoadUserProfile");
|
||||
|
||||
WebProvider.EnableLoadUserProfile();
|
||||
|
||||
Log.WriteEnd("EnableLoadUserProfile");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteError("EnableLoadUserProfile", ex);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[WebMethod, SoapHeader("settings")]
|
||||
public void InitFeeds(int UserId, string[] feeds)
|
||||
{
|
||||
|
|
|
@ -876,6 +876,9 @@
|
|||
<data name="Error.WPI_LOAD_FEED" xml:space="preserve">
|
||||
<value>Error loading feeds. Please check system settings</value>
|
||||
</data>
|
||||
<data name="Error.WPI_CHECK_LOAD_USER_PROFILE" xml:space="preserve">
|
||||
<value>Error checking 'Load user profile' application pool setting.</value>
|
||||
</data>
|
||||
<data name="Error.SPACE_LETTER_GET" xml:space="preserve">
|
||||
<value>Error building hosting space summary letter</value>
|
||||
</data>
|
||||
|
|
|
@ -126,6 +126,16 @@ h2.ProductTitle {
|
|||
</script>
|
||||
|
||||
|
||||
<asp:Panel runat="server" ID="CheckLoadUserProfilePanel" Visible="False">
|
||||
<div class="MessageBox Yellow">
|
||||
To continue "Load User Profile" setting for the current application pool must be enabled.
|
||||
<br/>
|
||||
Enable this setting now? (May require relogin)
|
||||
<br/>
|
||||
<br/>
|
||||
<asp:Button runat="server" ID="EnableLoadUserProfileButton" Text="Yes" OnClick="EnableLoadUserProfileButton_OnClick"/>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
|
||||
|
||||
<asp:Panel ID="SearchPanel" class="FormBody" runat="server">
|
||||
|
@ -284,7 +294,7 @@ h2.ProductTitle {
|
|||
<ContentTemplate>
|
||||
<asp:Timer ID="ProgressTimer" runat="server" Enabled="False" Interval="3000" OnTick="ProgressTimerTick"></asp:Timer>
|
||||
<asp:Panel ID="ProgressMessagePanel" class="FormBody" runat="server">
|
||||
<h3 class="NormalBold">Selected products are installed now:</h3>
|
||||
<h3 class="NormalBold">Selected products are being installed now:</h3>
|
||||
<br/>
|
||||
<asp:Image runat="server" ID="ProgressAnimation" ImageAlign="AbsMiddle" ImageUrl="" CssClass="ProgressAnimation"></asp:Image>
|
||||
<asp:Label ID="ProgressMessage" runat="server">initializing...</asp:Label>
|
||||
|
|
|
@ -52,6 +52,33 @@ namespace WebsitePanel.Portal
|
|||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
if (!ES.Services.Servers.CheckLoadUserProfile(PanelRequest.ServerId))
|
||||
{
|
||||
CheckLoadUserProfilePanel.Visible = true;
|
||||
}
|
||||
}
|
||||
catch (NotImplementedException ex)
|
||||
{
|
||||
CheckLoadUserProfilePanel.Visible = false;
|
||||
ShowWarningMessage("Server application pool \"Load User Profile\" setting unavailable. IIS7 or higher is expected.");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
CheckLoadUserProfilePanel.Visible = false;
|
||||
ProductsPanel.Visible = false;
|
||||
keywordsList.Visible = false;
|
||||
SearchPanel.Visible = false;
|
||||
InstallButtons1.Visible = false;
|
||||
InstallButtons2.Visible = false;
|
||||
|
||||
ShowErrorMessage("WPI_CHECK_LOAD_USER_PROFILE", ex);
|
||||
}
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
ES.Services.Servers.InitWPIFeeds(PanelRequest.ServerId);
|
||||
|
@ -582,5 +609,11 @@ namespace WebsitePanel.Portal
|
|||
WpiLogsPre.InnerText = msg;
|
||||
}
|
||||
}
|
||||
|
||||
protected void EnableLoadUserProfileButton_OnClick(object sender, EventArgs e)
|
||||
{
|
||||
ES.Services.Servers.EnableLoadUserProfile(PanelRequest.ServerId);
|
||||
CheckLoadUserProfilePanel.Visible = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
|
@ -59,6 +58,24 @@ namespace WebsitePanel.Portal {
|
|||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.ServerHeaderControl ServerHeaderControl1;
|
||||
|
||||
/// <summary>
|
||||
/// CheckLoadUserProfilePanel control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Panel CheckLoadUserProfilePanel;
|
||||
|
||||
/// <summary>
|
||||
/// EnableLoadUserProfileButton control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Button EnableLoadUserProfileButton;
|
||||
|
||||
/// <summary>
|
||||
/// SearchPanel control.
|
||||
/// </summary>
|
||||
|
|
|
@ -155,7 +155,7 @@ namespace WebsitePanel.Portal
|
|||
}
|
||||
|
||||
// MySQL Server
|
||||
else if (FindParameterByTag(parameters, DeploymentParameterWellKnownTag.MySql) != null)
|
||||
if (FindParameterByTag(parameters, DeploymentParameterWellKnownTag.MySql) != null)
|
||||
{
|
||||
// load package context
|
||||
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
||||
|
@ -170,15 +170,15 @@ namespace WebsitePanel.Portal
|
|||
}
|
||||
|
||||
// SQLite
|
||||
else if (FindParameterByTag(parameters, DeploymentParameterWellKnownTag.SqLite) != null)
|
||||
if (FindParameterByTag(parameters, DeploymentParameterWellKnownTag.SqLite) != null)
|
||||
AddDatabaseEngine(DeploymentParameterWellKnownTag.SqLite, "", GetLocalizedString("DatabaseEngine.SQLite"));
|
||||
|
||||
// Flat File
|
||||
else if (FindParameterByTag(parameters, DeploymentParameterWellKnownTag.FlatFile) != null)
|
||||
if (FindParameterByTag(parameters, DeploymentParameterWellKnownTag.FlatFile) != null)
|
||||
AddDatabaseEngine(DeploymentParameterWellKnownTag.FlatFile, "", GetLocalizedString("DatabaseEngine.FlatFile"));
|
||||
|
||||
// VistaFB
|
||||
else if (FindParameterByTag(parameters, DeploymentParameterWellKnownTag.VistaDB) != null)
|
||||
if (FindParameterByTag(parameters, DeploymentParameterWellKnownTag.VistaDB) != null)
|
||||
AddDatabaseEngine(DeploymentParameterWellKnownTag.VistaDB, "", GetLocalizedString("DatabaseEngine.VistaDB"));
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue