merge commit

This commit is contained in:
robvde 2012-09-15 09:28:58 +04:00
commit 465731273a
21 changed files with 739 additions and 263 deletions

View file

@ -33,6 +33,7 @@ using System.Data.SqlClient;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using WebsitePanel.Providers.HostedSolution; using WebsitePanel.Providers.HostedSolution;
using Microsoft.ApplicationBlocks.Data; using Microsoft.ApplicationBlocks.Data;
using System.Collections.Generic;
namespace WebsitePanel.EnterpriseServer namespace WebsitePanel.EnterpriseServer
{ {
@ -3399,5 +3400,45 @@ namespace WebsitePanel.EnterpriseServer
#endregion #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;
}
} }
} }

View file

@ -41,6 +41,7 @@ using WebsitePanel.Providers.OS;
using OS = WebsitePanel.Providers.OS; using OS = WebsitePanel.Providers.OS;
using System.Collections; using System.Collections;
namespace WebsitePanel.EnterpriseServer namespace WebsitePanel.EnterpriseServer
{ {
public class OperatingSystemController : IImportController, IBackupController public class OperatingSystemController : IImportController, IBackupController
@ -409,6 +410,23 @@ namespace WebsitePanel.EnterpriseServer
#region Web Platform Installer #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) public static void InitWPIFeeds(int serverId, string feedUrls)
{ {
GetServerService(serverId).InitWPIFeeds(feedUrls); GetServerService(serverId).InitWPIFeeds(feedUrls);
@ -747,6 +765,7 @@ namespace WebsitePanel.EnterpriseServer
} }
#endregion #endregion
} }
} }

View file

@ -5,11 +5,11 @@
</configSections> </configSections>
<!-- Connection strings --> <!-- Connection strings -->
<connectionStrings> <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> </connectionStrings>
<appSettings> <appSettings>
<!-- Encryption util settings --> <!-- Encryption util settings -->
<add key="WebsitePanel.CryptoKey" value="3x7eqt7zabc5n5afs6dg" /> <add key="WebsitePanel.CryptoKey" value="1234567890" />
<!-- A1D4KDHUE83NKHddF --> <!-- A1D4KDHUE83NKHddF -->
<add key="WebsitePanel.EncryptionEnabled" value="true" /> <add key="WebsitePanel.EncryptionEnabled" value="true" />
<!-- Web Applications --> <!-- Web Applications -->

View file

@ -670,6 +670,20 @@ namespace WebsitePanel.EnterpriseServer
#region Web Platform Installer #region Web Platform Installer
[WebMethod]
public bool CheckLoadUserProfile(int serverId)
{
return OperatingSystemController.CheckLoadUserProfile(serverId);
}
[WebMethod]
public void EnableLoadUserProfile(int serverId)
{
OperatingSystemController.EnableLoadUserProfile(serverId);
}
[WebMethod] [WebMethod]
public void InitWPIFeeds(int serverId) public void InitWPIFeeds(int serverId)
{ {

View file

@ -119,6 +119,8 @@ namespace WebsitePanel.Providers.Web
// web app gallery // web app gallery
bool CheckLoadUserProfile();
void EnableLoadUserProfile();
void InitFeeds(int UserId, string[] feeds); void InitFeeds(int UserId, string[] feeds);
void SetResourceLanguage(int UserId, string resourceLanguage); void SetResourceLanguage(int UserId, string resourceLanguage);
bool IsMsDeployInstalled(); bool IsMsDeployInstalled();
@ -153,5 +155,7 @@ namespace WebsitePanel.Providers.Web
ResultObject DeleteCertificate(SSLCertificate certificate, WebSite website); ResultObject DeleteCertificate(SSLCertificate certificate, WebSite website);
SSLCertificate ImportCertificate(WebSite website); SSLCertificate ImportCertificate(WebSite website);
bool CheckCertificate(WebSite webSite); bool CheckCertificate(WebSite webSite);
} }
} }

View file

@ -87,7 +87,7 @@ namespace WebsitePanel.Providers.WebAppGallery
//SiteUserPassword = 549755813888, //SiteUserPassword = 549755813888,
ALLKNOWN = AllKnown =
AppHostConfig | AppHostConfig |
AppPoolConfig | AppPoolConfig |
Boolean | Boolean |
@ -155,5 +155,21 @@ namespace WebsitePanel.Providers.WebAppGallery
return String.Format("{0}=\"{1}\", Tags={2}", Name, Value, WellKnownTags.ToString()); return String.Format("{0}=\"{1}\", Tags={2}", Name, Value, WellKnownTags.ToString());
} }
#endif #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;
}
} }
} }

View file

@ -4042,6 +4042,26 @@ namespace WebsitePanel.Providers.Web
// moved down to IIs60 // 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 #endregion
} }
} }

View file

@ -3394,6 +3394,18 @@ namespace WebsitePanel.Providers.Web
private const string WPI_INSTANCE_VIEWER = "viewer"; private const string WPI_INSTANCE_VIEWER = "viewer";
private const string WPI_INSTANCE_INSTALLER = "installer"; 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) public void InitFeeds(int UserId, string[] feeds)
{ {
//need to call InitFeeds() before any operation with WPIApplicationGallery() //need to call InitFeeds() before any operation with WPIApplicationGallery()
@ -3667,5 +3679,10 @@ namespace WebsitePanel.Providers.Web
throw new NotSupportedException(); throw new NotSupportedException();
} }
#endregion #endregion
} }
} }

View file

@ -44,6 +44,7 @@ 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; using DeploymentParameter = WebsitePanel.Providers.WebAppGallery.DeploymentParameter;
using DeploymentParameterWPI = Microsoft.Web.PlatformInstaller.DeploymentParameter;
namespace WebsitePanel.Providers.Web.WPIWebApplicationGallery namespace WebsitePanel.Providers.Web.WPIWebApplicationGallery
{ {
@ -268,10 +269,10 @@ namespace WebsitePanel.Providers.Web.WPIWebApplicationGallery
Product product = wpi.GetProduct(id); Product product = wpi.GetProduct(id);
List<DeploymentParameter> deploymentParameters = new List<DeploymentParameter>(); List<DeploymentParameter> deploymentParameters = new List<DeploymentParameter>();
IList<DeclaredParameter> appDecalredParameters = wpi.GetAppDecalredParameters(id); IList<DeploymentParameterWPI> appDeploymentWPIParameters = wpi.GetAppDecalredParameters(id);
foreach (DeclaredParameter declaredParameter in appDecalredParameters) foreach (DeploymentParameterWPI deploymentParameter in appDeploymentWPIParameters)
{ {
deploymentParameters.Add(MakeDeploymentParameterFromDecalredParameter(declaredParameter)); deploymentParameters.Add(MakeDeploymentParameterFromDecalredParameter(deploymentParameter));
} }
return deploymentParameters; 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(); DeploymentParameter r = new DeploymentParameter();
r.Name = d.Name; r.Name = d.Name;
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.SetWellKnownTagsFromRawString(d.RawTags);
r.WellKnownTags = DeploymentParameterWellKnownTag.ALLKNOWN & (DeploymentParameterWellKnownTag) d.Tags; if (!string.IsNullOrEmpty(d.ValidationString))
if (null != d.Validation)
{ {
r.ValidationKind = (DeploymentParameterValidationKind) d.Validation.Kind; // synchronized with Microsoft.Web.Deployment.DeploymentSyncParameterValidationKind
r.ValidationString = d.Validation.ValidationString; 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 else
{ {
r.ValidationKind = DeploymentParameterValidationKind.None; r.ValidationKind = DeploymentParameterValidationKind.None;
} }
#pragma warning restore 612,618
return r; return r;
} }

View file

@ -77,11 +77,6 @@
<HintPath>..\..\Lib\References\Microsoft\Microsoft.Web.PlatformInstaller.dll</HintPath> <HintPath>..\..\Lib\References\Microsoft\Microsoft.Web.PlatformInstaller.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </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" />
<Reference Include="System.Data" /> <Reference Include="System.Data" />
<Reference Include="System.DirectoryServices" /> <Reference Include="System.DirectoryServices" />

View file

@ -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 // - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer. // list of conditions and the following disclaimer.
@ -52,6 +47,7 @@ namespace WebsitePanel.Providers.Web
using WebsitePanel.Providers.Common; using WebsitePanel.Providers.Common;
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()]
@ -180,6 +176,10 @@ namespace WebsitePanel.Providers.Web
private System.Threading.SendOrPostCallback DeleteHeliconApeGroupOperationCompleted; private System.Threading.SendOrPostCallback DeleteHeliconApeGroupOperationCompleted;
private System.Threading.SendOrPostCallback CheckLoadUserProfileOperationCompleted;
private System.Threading.SendOrPostCallback EnableLoadUserProfileOperationCompleted;
private System.Threading.SendOrPostCallback InitFeedsOperationCompleted; private System.Threading.SendOrPostCallback InitFeedsOperationCompleted;
private System.Threading.SendOrPostCallback SetResourceLanguageOperationCompleted; private System.Threading.SendOrPostCallback SetResourceLanguageOperationCompleted;
@ -416,6 +416,12 @@ namespace WebsitePanel.Providers.Web
/// <remarks/> /// <remarks/>
public event DeleteHeliconApeGroupCompletedEventHandler DeleteHeliconApeGroupCompleted; public event DeleteHeliconApeGroupCompletedEventHandler DeleteHeliconApeGroupCompleted;
/// <remarks/>
public event CheckLoadUserProfileCompletedEventHandler CheckLoadUserProfileCompleted;
/// <remarks/>
public event EnableLoadUserProfileCompletedEventHandler EnableLoadUserProfileCompleted;
/// <remarks/> /// <remarks/>
public event InitFeedsCompletedEventHandler InitFeedsCompleted; 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/> /// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] [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)] [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")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void DeleteHeliconApeGroupCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); 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/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void InitFeedsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); public delegate void InitFeedsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);

View file

@ -38,6 +38,7 @@ using System.Threading;
using Microsoft.Web.Deployment; using Microsoft.Web.Deployment;
using Microsoft.Web.PlatformInstaller; using Microsoft.Web.PlatformInstaller;
using Installer = Microsoft.Web.PlatformInstaller.Installer; using Installer = Microsoft.Web.PlatformInstaller.Installer;
using DeploymentParameterWPI = Microsoft.Web.PlatformInstaller.DeploymentParameter;
namespace WebsitePanel.Server.Code namespace WebsitePanel.Server.Code
{ {
@ -453,11 +454,11 @@ namespace WebsitePanel.Server.Code
return products; return products;
} }
public IList<DeclaredParameter> GetAppDecalredParameters(string productId) public IList<DeploymentParameterWPI> GetAppDecalredParameters(string productId)
{ {
Product app = _productManager.GetProduct(productId); Product app = _productManager.GetProduct(productId);
Installer appInstaller = app.GetInstaller(GetLanguage(null)); Installer appInstaller = app.GetInstaller(GetLanguage(null));
return appInstaller.MSDeployPackage.DeclaredParameters; return appInstaller.MSDeployPackage.DeploymentParameters;
} }
public bool InstallApplication( public bool InstallApplication(
@ -501,7 +502,7 @@ namespace WebsitePanel.Server.Code
DeploymentWellKnownTag dbTag = (DeploymentWellKnownTag)GetDbTag(updatedValues); DeploymentWellKnownTag dbTag = (DeploymentWellKnownTag)GetDbTag(updatedValues);
// remove parameters with alien db tags // remove parameters with alien db tags
foreach (DeclaredParameter parameter in appInstaller.MSDeployPackage.DeclaredParameters) foreach (DeploymentParameterWPI parameter in appInstaller.MSDeployPackage.DeploymentParameters)
{ {
if (IsAlienDbTaggedParameter(dbTag, parameter)) if (IsAlienDbTaggedParameter(dbTag, parameter))
{ {
@ -726,13 +727,16 @@ namespace WebsitePanel.Server.Code
return DeploymentWellKnownTag.None; 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 #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 #pragma warning restore 612,618
*/
} }
private static void RemoveUnusedProviders(MSDeployPackage msDeployPackage, DeploymentWellKnownTag dbTag) private static void RemoveUnusedProviders(MSDeployPackage msDeployPackage, DeploymentWellKnownTag dbTag)

View file

@ -1061,6 +1061,42 @@ namespace WebsitePanel.Server
#endregion #endregion
#region Web Application Gallery #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")] [WebMethod, SoapHeader("settings")]
public void InitFeeds(int UserId, string[] feeds) public void InitFeeds(int UserId, string[] feeds)
{ {

View file

@ -876,6 +876,9 @@
<data name="Error.WPI_LOAD_FEED" xml:space="preserve"> <data name="Error.WPI_LOAD_FEED" xml:space="preserve">
<value>Error loading feeds. Please check system settings</value> <value>Error loading feeds. Please check system settings</value>
</data> </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"> <data name="Error.SPACE_LETTER_GET" xml:space="preserve">
<value>Error building hosting space summary letter</value> <value>Error building hosting space summary letter</value>
</data> </data>

View file

@ -126,6 +126,16 @@ h2.ProductTitle {
</script> </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"> <asp:Panel ID="SearchPanel" class="FormBody" runat="server">
@ -284,7 +294,7 @@ h2.ProductTitle {
<ContentTemplate> <ContentTemplate>
<asp:Timer ID="ProgressTimer" runat="server" Enabled="False" Interval="3000" OnTick="ProgressTimerTick"></asp:Timer> <asp:Timer ID="ProgressTimer" runat="server" Enabled="False" Interval="3000" OnTick="ProgressTimerTick"></asp:Timer>
<asp:Panel ID="ProgressMessagePanel" class="FormBody" runat="server"> <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/> <br/>
<asp:Image runat="server" ID="ProgressAnimation" ImageAlign="AbsMiddle" ImageUrl="" CssClass="ProgressAnimation"></asp:Image> <asp:Image runat="server" ID="ProgressAnimation" ImageAlign="AbsMiddle" ImageUrl="" CssClass="ProgressAnimation"></asp:Image>
<asp:Label ID="ProgressMessage" runat="server">initializing...</asp:Label> <asp:Label ID="ProgressMessage" runat="server">initializing...</asp:Label>

View file

@ -52,6 +52,33 @@ namespace WebsitePanel.Portal
{ {
if (!IsPostBack) 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 try
{ {
ES.Services.Servers.InitWPIFeeds(PanelRequest.ServerId); ES.Services.Servers.InitWPIFeeds(PanelRequest.ServerId);
@ -582,5 +609,11 @@ namespace WebsitePanel.Portal
WpiLogsPre.InnerText = msg; WpiLogsPre.InnerText = msg;
} }
} }
protected void EnableLoadUserProfileButton_OnClick(object sender, EventArgs e)
{
ES.Services.Servers.EnableLoadUserProfile(PanelRequest.ServerId);
CheckLoadUserProfilePanel.Visible = false;
}
} }
} }

View file

@ -26,7 +26,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
@ -59,6 +58,24 @@ namespace WebsitePanel.Portal {
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.ServerHeaderControl ServerHeaderControl1; 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> /// <summary>
/// SearchPanel control. /// SearchPanel control.
/// </summary> /// </summary>

View file

@ -155,7 +155,7 @@ namespace WebsitePanel.Portal
} }
// MySQL Server // MySQL Server
else if (FindParameterByTag(parameters, DeploymentParameterWellKnownTag.MySql) != null) if (FindParameterByTag(parameters, DeploymentParameterWellKnownTag.MySql) != null)
{ {
// load package context // load package context
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId); PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
@ -170,15 +170,15 @@ namespace WebsitePanel.Portal
} }
// SQLite // SQLite
else if (FindParameterByTag(parameters, DeploymentParameterWellKnownTag.SqLite) != null) if (FindParameterByTag(parameters, DeploymentParameterWellKnownTag.SqLite) != null)
AddDatabaseEngine(DeploymentParameterWellKnownTag.SqLite, "", GetLocalizedString("DatabaseEngine.SQLite")); AddDatabaseEngine(DeploymentParameterWellKnownTag.SqLite, "", GetLocalizedString("DatabaseEngine.SQLite"));
// Flat File // Flat File
else if (FindParameterByTag(parameters, DeploymentParameterWellKnownTag.FlatFile) != null) if (FindParameterByTag(parameters, DeploymentParameterWellKnownTag.FlatFile) != null)
AddDatabaseEngine(DeploymentParameterWellKnownTag.FlatFile, "", GetLocalizedString("DatabaseEngine.FlatFile")); AddDatabaseEngine(DeploymentParameterWellKnownTag.FlatFile, "", GetLocalizedString("DatabaseEngine.FlatFile"));
// VistaFB // VistaFB
else if (FindParameterByTag(parameters, DeploymentParameterWellKnownTag.VistaDB) != null) if (FindParameterByTag(parameters, DeploymentParameterWellKnownTag.VistaDB) != null)
AddDatabaseEngine(DeploymentParameterWellKnownTag.VistaDB, "", GetLocalizedString("DatabaseEngine.VistaDB")); AddDatabaseEngine(DeploymentParameterWellKnownTag.VistaDB, "", GetLocalizedString("DatabaseEngine.VistaDB"));