Commit Contribution from Helicon
Includes: - complete re-write of Web Application Gallery - Addition of Web PI Installer in Server module
This commit is contained in:
parent
3b81883a25
commit
a2beec7fe4
80 changed files with 9236 additions and 1762 deletions
Binary file not shown.
BIN
WebsitePanel/Lib/Microsoft.Web.PlatformInstaller.dll
Normal file
BIN
WebsitePanel/Lib/Microsoft.Web.PlatformInstaller.dll
Normal file
Binary file not shown.
Binary file not shown.
|
@ -41,6 +41,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
public const string SMTP_SETTINGS = "SmtpSettings";
|
||||
public const string BACKUP_SETTINGS = "BackupSettings";
|
||||
public const string SETUP_SETTINGS = "SetupSettings";
|
||||
public const string WPI_SETTINGS = "WpiSettings";
|
||||
|
||||
public static readonly SystemSettings Empty = new SystemSettings { SettingsArray = new string[][] {} };
|
||||
|
||||
|
|
|
@ -48,11 +48,11 @@ namespace WebsitePanel.EnterpriseServer
|
|||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Data;
|
||||
|
||||
using WebsitePanel.Providers;
|
||||
using WebsitePanel.Providers.Common;
|
||||
using WebsitePanel.Server;
|
||||
using WebsitePanel.Providers.DNS;
|
||||
using WebsitePanel.Providers.ResultObjects;
|
||||
using WebsitePanel.Providers.ResultObjects;
|
||||
|
||||
|
||||
/// <remarks/>
|
||||
|
@ -251,6 +251,28 @@ namespace WebsitePanel.EnterpriseServer
|
|||
|
||||
private System.Threading.SendOrPostCallback TerminateWindowsProcessOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback InitWPIFeedsOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback GetWPITabsOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback GetWPIKeywordsOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback GetWPIProductsOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback GetWPIProductsFilteredOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback GetWPIProductsWithDependenciesOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback InstallWPIProductsOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback CancelInstallWPIProductsOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback GetWPIStatusOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback WpiGetLogFileDirectoryOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback WpiGetLogsInDirectoryOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback GetWindowsServicesOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback ChangeWindowsServiceStatusOperationCompleted;
|
||||
|
@ -553,6 +575,39 @@ namespace WebsitePanel.EnterpriseServer
|
|||
/// <remarks/>
|
||||
public event TerminateWindowsProcessCompletedEventHandler TerminateWindowsProcessCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event InitWPIFeedsCompletedEventHandler InitWPIFeedsCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event GetWPITabsCompletedEventHandler GetWPITabsCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event GetWPIKeywordsCompletedEventHandler GetWPIKeywordsCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event GetWPIProductsCompletedEventHandler GetWPIProductsCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event GetWPIProductsFilteredCompletedEventHandler GetWPIProductsFilteredCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event GetWPIProductsWithDependenciesCompletedEventHandler GetWPIProductsWithDependenciesCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event InstallWPIProductsCompletedEventHandler InstallWPIProductsCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event CancelInstallWPIProductsCompletedEventHandler CancelInstallWPIProductsCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event GetWPIStatusCompletedEventHandler GetWPIStatusCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event WpiGetLogFileDirectoryCompletedEventHandler WpiGetLogFileDirectoryCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event WpiGetLogsInDirectoryCompletedEventHandler WpiGetLogsInDirectoryCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event GetWindowsServicesCompletedEventHandler GetWindowsServicesCompleted;
|
||||
|
||||
|
@ -5451,9 +5506,471 @@ namespace WebsitePanel.EnterpriseServer
|
|||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetWindowsServices", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public WindowsService[] GetWindowsServices(int serverId)
|
||||
{
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/InitWPIFeeds", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public void InitWPIFeeds(int serverId) {
|
||||
this.Invoke("InitWPIFeeds", new object[] {
|
||||
serverId});
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginInitWPIFeeds(int serverId, System.AsyncCallback callback, object asyncState) {
|
||||
return this.BeginInvoke("InitWPIFeeds", new object[] {
|
||||
serverId}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void EndInitWPIFeeds(System.IAsyncResult asyncResult) {
|
||||
this.EndInvoke(asyncResult);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void InitWPIFeedsAsync(int serverId) {
|
||||
this.InitWPIFeedsAsync(serverId, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void InitWPIFeedsAsync(int serverId, object userState) {
|
||||
if ((this.InitWPIFeedsOperationCompleted == null)) {
|
||||
this.InitWPIFeedsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnInitWPIFeedsOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("InitWPIFeeds", new object[] {
|
||||
serverId}, this.InitWPIFeedsOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnInitWPIFeedsOperationCompleted(object arg) {
|
||||
if ((this.InitWPIFeedsCompleted != null)) {
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.InitWPIFeedsCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetWPITabs", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public WPITab[] GetWPITabs(int serverId) {
|
||||
object[] results = this.Invoke("GetWPITabs", new object[] {
|
||||
serverId});
|
||||
return ((WPITab[])(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginGetWPITabs(int serverId, System.AsyncCallback callback, object asyncState) {
|
||||
return this.BeginInvoke("GetWPITabs", new object[] {
|
||||
serverId}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public WPITab[] EndGetWPITabs(System.IAsyncResult asyncResult) {
|
||||
object[] results = this.EndInvoke(asyncResult);
|
||||
return ((WPITab[])(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void GetWPITabsAsync(int serverId) {
|
||||
this.GetWPITabsAsync(serverId, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void GetWPITabsAsync(int serverId, object userState) {
|
||||
if ((this.GetWPITabsOperationCompleted == null)) {
|
||||
this.GetWPITabsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetWPITabsOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("GetWPITabs", new object[] {
|
||||
serverId}, this.GetWPITabsOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnGetWPITabsOperationCompleted(object arg) {
|
||||
if ((this.GetWPITabsCompleted != null)) {
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.GetWPITabsCompleted(this, new GetWPITabsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetWPIKeywords", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public WPIKeyword[] GetWPIKeywords(int serverId) {
|
||||
object[] results = this.Invoke("GetWPIKeywords", new object[] {
|
||||
serverId});
|
||||
return ((WPIKeyword[])(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginGetWPIKeywords(int serverId, System.AsyncCallback callback, object asyncState) {
|
||||
return this.BeginInvoke("GetWPIKeywords", new object[] {
|
||||
serverId}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public WPIKeyword[] EndGetWPIKeywords(System.IAsyncResult asyncResult) {
|
||||
object[] results = this.EndInvoke(asyncResult);
|
||||
return ((WPIKeyword[])(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void GetWPIKeywordsAsync(int serverId) {
|
||||
this.GetWPIKeywordsAsync(serverId, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void GetWPIKeywordsAsync(int serverId, object userState) {
|
||||
if ((this.GetWPIKeywordsOperationCompleted == null)) {
|
||||
this.GetWPIKeywordsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetWPIKeywordsOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("GetWPIKeywords", new object[] {
|
||||
serverId}, this.GetWPIKeywordsOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnGetWPIKeywordsOperationCompleted(object arg) {
|
||||
if ((this.GetWPIKeywordsCompleted != null)) {
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.GetWPIKeywordsCompleted(this, new GetWPIKeywordsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetWPIProducts", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public WPIProduct[] GetWPIProducts(int serverId, string tabId, string keywordId) {
|
||||
object[] results = this.Invoke("GetWPIProducts", new object[] {
|
||||
serverId,
|
||||
tabId,
|
||||
keywordId});
|
||||
return ((WPIProduct[])(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginGetWPIProducts(int serverId, string tabId, string keywordId, System.AsyncCallback callback, object asyncState) {
|
||||
return this.BeginInvoke("GetWPIProducts", new object[] {
|
||||
serverId,
|
||||
tabId,
|
||||
keywordId}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public WPIProduct[] EndGetWPIProducts(System.IAsyncResult asyncResult) {
|
||||
object[] results = this.EndInvoke(asyncResult);
|
||||
return ((WPIProduct[])(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void GetWPIProductsAsync(int serverId, string tabId, string keywordId) {
|
||||
this.GetWPIProductsAsync(serverId, tabId, keywordId, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void GetWPIProductsAsync(int serverId, string tabId, string keywordId, object userState) {
|
||||
if ((this.GetWPIProductsOperationCompleted == null)) {
|
||||
this.GetWPIProductsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetWPIProductsOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("GetWPIProducts", new object[] {
|
||||
serverId,
|
||||
tabId,
|
||||
keywordId}, this.GetWPIProductsOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnGetWPIProductsOperationCompleted(object arg) {
|
||||
if ((this.GetWPIProductsCompleted != null)) {
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.GetWPIProductsCompleted(this, new GetWPIProductsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetWPIProductsFiltered", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public WPIProduct[] GetWPIProductsFiltered(int serverId, string keywordId) {
|
||||
object[] results = this.Invoke("GetWPIProductsFiltered", new object[] {
|
||||
serverId,
|
||||
keywordId});
|
||||
return ((WPIProduct[])(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginGetWPIProductsFiltered(int serverId, string keywordId, System.AsyncCallback callback, object asyncState) {
|
||||
return this.BeginInvoke("GetWPIProductsFiltered", new object[] {
|
||||
serverId,
|
||||
keywordId}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public WPIProduct[] EndGetWPIProductsFiltered(System.IAsyncResult asyncResult) {
|
||||
object[] results = this.EndInvoke(asyncResult);
|
||||
return ((WPIProduct[])(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void GetWPIProductsFilteredAsync(int serverId, string keywordId) {
|
||||
this.GetWPIProductsFilteredAsync(serverId, keywordId, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void GetWPIProductsFilteredAsync(int serverId, string keywordId, object userState) {
|
||||
if ((this.GetWPIProductsFilteredOperationCompleted == null)) {
|
||||
this.GetWPIProductsFilteredOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetWPIProductsFilteredOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("GetWPIProductsFiltered", new object[] {
|
||||
serverId,
|
||||
keywordId}, this.GetWPIProductsFilteredOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnGetWPIProductsFilteredOperationCompleted(object arg) {
|
||||
if ((this.GetWPIProductsFilteredCompleted != null)) {
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.GetWPIProductsFilteredCompleted(this, new GetWPIProductsFilteredCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetWPIProductsWithDependencies", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public WPIProduct[] GetWPIProductsWithDependencies(int serverId, string[] products) {
|
||||
object[] results = this.Invoke("GetWPIProductsWithDependencies", new object[] {
|
||||
serverId,
|
||||
products});
|
||||
return ((WPIProduct[])(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginGetWPIProductsWithDependencies(int serverId, string[] products, System.AsyncCallback callback, object asyncState) {
|
||||
return this.BeginInvoke("GetWPIProductsWithDependencies", new object[] {
|
||||
serverId,
|
||||
products}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public WPIProduct[] EndGetWPIProductsWithDependencies(System.IAsyncResult asyncResult) {
|
||||
object[] results = this.EndInvoke(asyncResult);
|
||||
return ((WPIProduct[])(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void GetWPIProductsWithDependenciesAsync(int serverId, string[] products) {
|
||||
this.GetWPIProductsWithDependenciesAsync(serverId, products, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void GetWPIProductsWithDependenciesAsync(int serverId, string[] products, object userState) {
|
||||
if ((this.GetWPIProductsWithDependenciesOperationCompleted == null)) {
|
||||
this.GetWPIProductsWithDependenciesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetWPIProductsWithDependenciesOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("GetWPIProductsWithDependencies", new object[] {
|
||||
serverId,
|
||||
products}, this.GetWPIProductsWithDependenciesOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnGetWPIProductsWithDependenciesOperationCompleted(object arg) {
|
||||
if ((this.GetWPIProductsWithDependenciesCompleted != null)) {
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.GetWPIProductsWithDependenciesCompleted(this, new GetWPIProductsWithDependenciesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/InstallWPIProducts", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public void InstallWPIProducts(int serverId, string[] products) {
|
||||
this.Invoke("InstallWPIProducts", new object[] {
|
||||
serverId,
|
||||
products});
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginInstallWPIProducts(int serverId, string[] products, System.AsyncCallback callback, object asyncState) {
|
||||
return this.BeginInvoke("InstallWPIProducts", new object[] {
|
||||
serverId,
|
||||
products}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void EndInstallWPIProducts(System.IAsyncResult asyncResult) {
|
||||
this.EndInvoke(asyncResult);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void InstallWPIProductsAsync(int serverId, string[] products) {
|
||||
this.InstallWPIProductsAsync(serverId, products, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void InstallWPIProductsAsync(int serverId, string[] products, object userState) {
|
||||
if ((this.InstallWPIProductsOperationCompleted == null)) {
|
||||
this.InstallWPIProductsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnInstallWPIProductsOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("InstallWPIProducts", new object[] {
|
||||
serverId,
|
||||
products}, this.InstallWPIProductsOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnInstallWPIProductsOperationCompleted(object arg) {
|
||||
if ((this.InstallWPIProductsCompleted != null)) {
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.InstallWPIProductsCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/CancelInstallWPIProducts", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public void CancelInstallWPIProducts(int serviceId) {
|
||||
this.Invoke("CancelInstallWPIProducts", new object[] {
|
||||
serviceId});
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginCancelInstallWPIProducts(int serviceId, System.AsyncCallback callback, object asyncState) {
|
||||
return this.BeginInvoke("CancelInstallWPIProducts", new object[] {
|
||||
serviceId}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void EndCancelInstallWPIProducts(System.IAsyncResult asyncResult) {
|
||||
this.EndInvoke(asyncResult);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void CancelInstallWPIProductsAsync(int serviceId) {
|
||||
this.CancelInstallWPIProductsAsync(serviceId, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void CancelInstallWPIProductsAsync(int serviceId, object userState) {
|
||||
if ((this.CancelInstallWPIProductsOperationCompleted == null)) {
|
||||
this.CancelInstallWPIProductsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCancelInstallWPIProductsOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("CancelInstallWPIProducts", new object[] {
|
||||
serviceId}, this.CancelInstallWPIProductsOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnCancelInstallWPIProductsOperationCompleted(object arg) {
|
||||
if ((this.CancelInstallWPIProductsCompleted != null)) {
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.CancelInstallWPIProductsCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetWPIStatus", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public string GetWPIStatus(int serverId) {
|
||||
object[] results = this.Invoke("GetWPIStatus", new object[] {
|
||||
serverId});
|
||||
return ((string)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginGetWPIStatus(int serverId, System.AsyncCallback callback, object asyncState) {
|
||||
return this.BeginInvoke("GetWPIStatus", new object[] {
|
||||
serverId}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public string EndGetWPIStatus(System.IAsyncResult asyncResult) {
|
||||
object[] results = this.EndInvoke(asyncResult);
|
||||
return ((string)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void GetWPIStatusAsync(int serverId) {
|
||||
this.GetWPIStatusAsync(serverId, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void GetWPIStatusAsync(int serverId, object userState) {
|
||||
if ((this.GetWPIStatusOperationCompleted == null)) {
|
||||
this.GetWPIStatusOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetWPIStatusOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("GetWPIStatus", new object[] {
|
||||
serverId}, this.GetWPIStatusOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnGetWPIStatusOperationCompleted(object arg) {
|
||||
if ((this.GetWPIStatusCompleted != null)) {
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.GetWPIStatusCompleted(this, new GetWPIStatusCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/WpiGetLogFileDirectory", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public string WpiGetLogFileDirectory(int serverId) {
|
||||
object[] results = this.Invoke("WpiGetLogFileDirectory", new object[] {
|
||||
serverId});
|
||||
return ((string)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginWpiGetLogFileDirectory(int serverId, System.AsyncCallback callback, object asyncState) {
|
||||
return this.BeginInvoke("WpiGetLogFileDirectory", new object[] {
|
||||
serverId}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public string EndWpiGetLogFileDirectory(System.IAsyncResult asyncResult) {
|
||||
object[] results = this.EndInvoke(asyncResult);
|
||||
return ((string)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void WpiGetLogFileDirectoryAsync(int serverId) {
|
||||
this.WpiGetLogFileDirectoryAsync(serverId, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void WpiGetLogFileDirectoryAsync(int serverId, object userState) {
|
||||
if ((this.WpiGetLogFileDirectoryOperationCompleted == null)) {
|
||||
this.WpiGetLogFileDirectoryOperationCompleted = new System.Threading.SendOrPostCallback(this.OnWpiGetLogFileDirectoryOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("WpiGetLogFileDirectory", new object[] {
|
||||
serverId}, this.WpiGetLogFileDirectoryOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnWpiGetLogFileDirectoryOperationCompleted(object arg) {
|
||||
if ((this.WpiGetLogFileDirectoryCompleted != null)) {
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.WpiGetLogFileDirectoryCompleted(this, new WpiGetLogFileDirectoryCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/WpiGetLogsInDirectory", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public SettingPair[] WpiGetLogsInDirectory(int serverId, string Path) {
|
||||
object[] results = this.Invoke("WpiGetLogsInDirectory", new object[] {
|
||||
serverId,
|
||||
Path});
|
||||
return ((SettingPair[])(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginWpiGetLogsInDirectory(int serverId, string Path, System.AsyncCallback callback, object asyncState) {
|
||||
return this.BeginInvoke("WpiGetLogsInDirectory", new object[] {
|
||||
serverId,
|
||||
Path}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public SettingPair[] EndWpiGetLogsInDirectory(System.IAsyncResult asyncResult) {
|
||||
object[] results = this.EndInvoke(asyncResult);
|
||||
return ((SettingPair[])(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void WpiGetLogsInDirectoryAsync(int serverId, string Path) {
|
||||
this.WpiGetLogsInDirectoryAsync(serverId, Path, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void WpiGetLogsInDirectoryAsync(int serverId, string Path, object userState) {
|
||||
if ((this.WpiGetLogsInDirectoryOperationCompleted == null)) {
|
||||
this.WpiGetLogsInDirectoryOperationCompleted = new System.Threading.SendOrPostCallback(this.OnWpiGetLogsInDirectoryOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("WpiGetLogsInDirectory", new object[] {
|
||||
serverId,
|
||||
Path}, this.WpiGetLogsInDirectoryOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnWpiGetLogsInDirectoryOperationCompleted(object arg) {
|
||||
if ((this.WpiGetLogsInDirectoryCompleted != null)) {
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.WpiGetLogsInDirectoryCompleted(this, new WpiGetLogsInDirectoryCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetWindowsServices", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public WindowsService[] GetWindowsServices(int serverId) {
|
||||
object[] results = this.Invoke("GetWindowsServices", new object[] {
|
||||
serverId});
|
||||
return ((WindowsService[])(results[0]));
|
||||
|
@ -8641,6 +9158,226 @@ namespace WebsitePanel.EnterpriseServer
|
|||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
public delegate void InitWPIFeedsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
public delegate void GetWPITabsCompletedEventHandler(object sender, GetWPITabsCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class GetWPITabsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||
|
||||
private object[] results;
|
||||
|
||||
internal GetWPITabsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||
base(exception, cancelled, userState) {
|
||||
this.results = results;
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public WPITab[] Result {
|
||||
get {
|
||||
this.RaiseExceptionIfNecessary();
|
||||
return ((WPITab[])(this.results[0]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
public delegate void GetWPIKeywordsCompletedEventHandler(object sender, GetWPIKeywordsCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class GetWPIKeywordsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||
|
||||
private object[] results;
|
||||
|
||||
internal GetWPIKeywordsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||
base(exception, cancelled, userState) {
|
||||
this.results = results;
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public WPIKeyword[] Result {
|
||||
get {
|
||||
this.RaiseExceptionIfNecessary();
|
||||
return ((WPIKeyword[])(this.results[0]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
public delegate void GetWPIProductsCompletedEventHandler(object sender, GetWPIProductsCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class GetWPIProductsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||
|
||||
private object[] results;
|
||||
|
||||
internal GetWPIProductsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||
base(exception, cancelled, userState) {
|
||||
this.results = results;
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public WPIProduct[] Result {
|
||||
get {
|
||||
this.RaiseExceptionIfNecessary();
|
||||
return ((WPIProduct[])(this.results[0]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
public delegate void GetWPIProductsFilteredCompletedEventHandler(object sender, GetWPIProductsFilteredCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class GetWPIProductsFilteredCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||
|
||||
private object[] results;
|
||||
|
||||
internal GetWPIProductsFilteredCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||
base(exception, cancelled, userState) {
|
||||
this.results = results;
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public WPIProduct[] Result {
|
||||
get {
|
||||
this.RaiseExceptionIfNecessary();
|
||||
return ((WPIProduct[])(this.results[0]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
public delegate void GetWPIProductsWithDependenciesCompletedEventHandler(object sender, GetWPIProductsWithDependenciesCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class GetWPIProductsWithDependenciesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||
|
||||
private object[] results;
|
||||
|
||||
internal GetWPIProductsWithDependenciesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||
base(exception, cancelled, userState) {
|
||||
this.results = results;
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public WPIProduct[] Result {
|
||||
get {
|
||||
this.RaiseExceptionIfNecessary();
|
||||
return ((WPIProduct[])(this.results[0]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
public delegate void InstallWPIProductsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
public delegate void CancelInstallWPIProductsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
public delegate void GetWPIStatusCompletedEventHandler(object sender, GetWPIStatusCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class GetWPIStatusCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||
|
||||
private object[] results;
|
||||
|
||||
internal GetWPIStatusCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||
base(exception, cancelled, userState) {
|
||||
this.results = results;
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public string Result {
|
||||
get {
|
||||
this.RaiseExceptionIfNecessary();
|
||||
return ((string)(this.results[0]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
public delegate void WpiGetLogFileDirectoryCompletedEventHandler(object sender, WpiGetLogFileDirectoryCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class WpiGetLogFileDirectoryCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||
|
||||
private object[] results;
|
||||
|
||||
internal WpiGetLogFileDirectoryCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||
base(exception, cancelled, userState) {
|
||||
this.results = results;
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public string Result {
|
||||
get {
|
||||
this.RaiseExceptionIfNecessary();
|
||||
return ((string)(this.results[0]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
public delegate void WpiGetLogsInDirectoryCompletedEventHandler(object sender, WpiGetLogsInDirectoryCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class WpiGetLogsInDirectoryCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||
|
||||
private object[] results;
|
||||
|
||||
internal WpiGetLogsInDirectoryCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||
base(exception, cancelled, userState) {
|
||||
this.results = results;
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public SettingPair[] Result {
|
||||
get {
|
||||
this.RaiseExceptionIfNecessary();
|
||||
return ((SettingPair[])(this.results[0]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
public delegate void GetWindowsServicesCompletedEventHandler(object sender, GetWindowsServicesCompletedEventArgs e);
|
||||
|
|
|
@ -39,30 +39,39 @@
|
|||
//
|
||||
// This source code was auto-generated by wsdl, Version=2.0.50727.1432.
|
||||
//
|
||||
namespace WebsitePanel.EnterpriseServer {
|
||||
namespace WebsitePanel.EnterpriseServer
|
||||
{
|
||||
using System.Diagnostics;
|
||||
using System.Web.Services;
|
||||
using System.ComponentModel;
|
||||
using System.Web.Services.Protocols;
|
||||
using System;
|
||||
using System.Xml.Serialization;
|
||||
using WebsitePanel.Providers.ResultObjects;
|
||||
using WebsitePanel.Providers.WebAppGallery;
|
||||
using WebsitePanel.Providers.Common;
|
||||
using WebsitePanel.Providers.ResultObjects;
|
||||
using WebsitePanel.Providers.WebAppGallery;
|
||||
using WebsitePanel.Providers.Common;
|
||||
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.1432")]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
[System.Web.Services.WebServiceBindingAttribute(Name="esWebApplicationGallerySoap", Namespace="http://tempuri.org/")]
|
||||
[System.Xml.Serialization.XmlIncludeAttribute(typeof(ResultObject))]
|
||||
public partial class esWebApplicationGallery : Microsoft.Web.Services3.WebServicesClientProtocol {
|
||||
|
||||
private System.Threading.SendOrPostCallback InitFeedsOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback SetResourceLanguageOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback GetGalleryLanguagesOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback GetGalleryApplicationsByServiceIdOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback GetGalleryApplicationsOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback GetGalleryApplicationsFilteredOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback GetGalleryCategoriesOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback GetGalleryApplicationDetailsOperationCompleted;
|
||||
|
@ -75,15 +84,27 @@ namespace WebsitePanel.EnterpriseServer {
|
|||
|
||||
/// <remarks/>
|
||||
public esWebApplicationGallery() {
|
||||
this.Url = "http://localhost:1625/esWebApplicationGallery.asmx";
|
||||
this.Url = "http://localhost:9002/esWebApplicationGallery.asmx";
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public event InitFeedsCompletedEventHandler InitFeedsCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event SetResourceLanguageCompletedEventHandler SetResourceLanguageCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event GetGalleryLanguagesCompletedEventHandler GetGalleryLanguagesCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event GetGalleryApplicationsByServiceIdCompletedEventHandler GetGalleryApplicationsByServiceIdCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event GetGalleryApplicationsCompletedEventHandler GetGalleryApplicationsCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event GetGalleryApplicationsFilteredCompletedEventHandler GetGalleryApplicationsFilteredCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event GetGalleryCategoriesCompletedEventHandler GetGalleryCategoriesCompleted;
|
||||
|
||||
|
@ -99,6 +120,128 @@ namespace WebsitePanel.EnterpriseServer {
|
|||
/// <remarks/>
|
||||
public event GetGalleryApplicationStatusCompletedEventHandler GetGalleryApplicationStatusCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/InitFeeds", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public void InitFeeds(int packageId) {
|
||||
this.Invoke("InitFeeds", new object[] {
|
||||
packageId});
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginInitFeeds(int packageId, System.AsyncCallback callback, object asyncState) {
|
||||
return this.BeginInvoke("InitFeeds", new object[] {
|
||||
packageId}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void EndInitFeeds(System.IAsyncResult asyncResult) {
|
||||
this.EndInvoke(asyncResult);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void InitFeedsAsync(int packageId) {
|
||||
this.InitFeedsAsync(packageId, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void InitFeedsAsync(int packageId, object userState) {
|
||||
if ((this.InitFeedsOperationCompleted == null)) {
|
||||
this.InitFeedsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnInitFeedsOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("InitFeeds", new object[] {
|
||||
packageId}, this.InitFeedsOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnInitFeedsOperationCompleted(object arg) {
|
||||
if ((this.InitFeedsCompleted != null)) {
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.InitFeedsCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SetResourceLanguage", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public void SetResourceLanguage(int packageId, string resourceLanguage) {
|
||||
this.Invoke("SetResourceLanguage", new object[] {
|
||||
packageId,
|
||||
resourceLanguage});
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginSetResourceLanguage(int packageId, string resourceLanguage, System.AsyncCallback callback, object asyncState) {
|
||||
return this.BeginInvoke("SetResourceLanguage", new object[] {
|
||||
packageId,
|
||||
resourceLanguage}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void EndSetResourceLanguage(System.IAsyncResult asyncResult) {
|
||||
this.EndInvoke(asyncResult);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void SetResourceLanguageAsync(int packageId, string resourceLanguage) {
|
||||
this.SetResourceLanguageAsync(packageId, resourceLanguage, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void SetResourceLanguageAsync(int packageId, string resourceLanguage, object userState) {
|
||||
if ((this.SetResourceLanguageOperationCompleted == null)) {
|
||||
this.SetResourceLanguageOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetResourceLanguageOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("SetResourceLanguage", new object[] {
|
||||
packageId,
|
||||
resourceLanguage}, this.SetResourceLanguageOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnSetResourceLanguageOperationCompleted(object arg) {
|
||||
if ((this.SetResourceLanguageCompleted != null)) {
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.SetResourceLanguageCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetGalleryLanguages", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public GalleryLanguagesResult GetGalleryLanguages(int packageId) {
|
||||
object[] results = this.Invoke("GetGalleryLanguages", new object[] {
|
||||
packageId});
|
||||
return ((GalleryLanguagesResult)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginGetGalleryLanguages(int packageId, System.AsyncCallback callback, object asyncState) {
|
||||
return this.BeginInvoke("GetGalleryLanguages", new object[] {
|
||||
packageId}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public GalleryLanguagesResult EndGetGalleryLanguages(System.IAsyncResult asyncResult) {
|
||||
object[] results = this.EndInvoke(asyncResult);
|
||||
return ((GalleryLanguagesResult)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void GetGalleryLanguagesAsync(int packageId) {
|
||||
this.GetGalleryLanguagesAsync(packageId, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void GetGalleryLanguagesAsync(int packageId, object userState) {
|
||||
if ((this.GetGalleryLanguagesOperationCompleted == null)) {
|
||||
this.GetGalleryLanguagesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetGalleryLanguagesOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("GetGalleryLanguages", new object[] {
|
||||
packageId}, this.GetGalleryLanguagesOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnGetGalleryLanguagesOperationCompleted(object arg) {
|
||||
if ((this.GetGalleryLanguagesCompleted != null)) {
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.GetGalleryLanguagesCompleted(this, new GetGalleryLanguagesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetGalleryApplicationsByServiceId", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public GalleryApplicationsResult GetGalleryApplicationsByServiceId(int serviceId) {
|
||||
|
@ -184,6 +327,50 @@ namespace WebsitePanel.EnterpriseServer {
|
|||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetGalleryApplicationsFiltered", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public GalleryApplicationsResult GetGalleryApplicationsFiltered(int packageId, string pattern) {
|
||||
object[] results = this.Invoke("GetGalleryApplicationsFiltered", new object[] {
|
||||
packageId,
|
||||
pattern});
|
||||
return ((GalleryApplicationsResult)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginGetGalleryApplicationsFiltered(int packageId, string pattern, System.AsyncCallback callback, object asyncState) {
|
||||
return this.BeginInvoke("GetGalleryApplicationsFiltered", new object[] {
|
||||
packageId,
|
||||
pattern}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public GalleryApplicationsResult EndGetGalleryApplicationsFiltered(System.IAsyncResult asyncResult) {
|
||||
object[] results = this.EndInvoke(asyncResult);
|
||||
return ((GalleryApplicationsResult)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void GetGalleryApplicationsFilteredAsync(int packageId, string pattern) {
|
||||
this.GetGalleryApplicationsFilteredAsync(packageId, pattern, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void GetGalleryApplicationsFilteredAsync(int packageId, string pattern, object userState) {
|
||||
if ((this.GetGalleryApplicationsFilteredOperationCompleted == null)) {
|
||||
this.GetGalleryApplicationsFilteredOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetGalleryApplicationsFilteredOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("GetGalleryApplicationsFiltered", new object[] {
|
||||
packageId,
|
||||
pattern}, this.GetGalleryApplicationsFilteredOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnGetGalleryApplicationsFilteredOperationCompleted(object arg) {
|
||||
if ((this.GetGalleryApplicationsFilteredCompleted != null)) {
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.GetGalleryApplicationsFilteredCompleted(this, new GetGalleryApplicationsFilteredCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetGalleryCategories", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public GalleryCategoriesResult GetGalleryCategories(int packageId) {
|
||||
|
@ -315,24 +502,26 @@ namespace WebsitePanel.EnterpriseServer {
|
|||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/Install", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public StringResultObject Install(int packageId, string webAppId, string siteName, string virtualDir, DeploymentParameter[] parameters) {
|
||||
public StringResultObject Install(int packageId, string webAppId, string siteName, string virtualDir, DeploymentParameter[] parameters, string languageId) {
|
||||
object[] results = this.Invoke("Install", new object[] {
|
||||
packageId,
|
||||
webAppId,
|
||||
siteName,
|
||||
virtualDir,
|
||||
parameters});
|
||||
parameters,
|
||||
languageId});
|
||||
return ((StringResultObject)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginInstall(int packageId, string webAppId, string siteName, string virtualDir, DeploymentParameter[] parameters, System.AsyncCallback callback, object asyncState) {
|
||||
public System.IAsyncResult BeginInstall(int packageId, string webAppId, string siteName, string virtualDir, DeploymentParameter[] parameters, string languageId, System.AsyncCallback callback, object asyncState) {
|
||||
return this.BeginInvoke("Install", new object[] {
|
||||
packageId,
|
||||
webAppId,
|
||||
siteName,
|
||||
virtualDir,
|
||||
parameters}, callback, asyncState);
|
||||
parameters,
|
||||
languageId}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
|
@ -342,12 +531,12 @@ namespace WebsitePanel.EnterpriseServer {
|
|||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void InstallAsync(int packageId, string webAppId, string siteName, string virtualDir, DeploymentParameter[] parameters) {
|
||||
this.InstallAsync(packageId, webAppId, siteName, virtualDir, parameters, null);
|
||||
public void InstallAsync(int packageId, string webAppId, string siteName, string virtualDir, DeploymentParameter[] parameters, string languageId) {
|
||||
this.InstallAsync(packageId, webAppId, siteName, virtualDir, parameters, languageId, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void InstallAsync(int packageId, string webAppId, string siteName, string virtualDir, DeploymentParameter[] parameters, object userState) {
|
||||
public void InstallAsync(int packageId, string webAppId, string siteName, string virtualDir, DeploymentParameter[] parameters, string languageId, object userState) {
|
||||
if ((this.InstallOperationCompleted == null)) {
|
||||
this.InstallOperationCompleted = new System.Threading.SendOrPostCallback(this.OnInstallOperationCompleted);
|
||||
}
|
||||
|
@ -356,7 +545,8 @@ namespace WebsitePanel.EnterpriseServer {
|
|||
webAppId,
|
||||
siteName,
|
||||
virtualDir,
|
||||
parameters}, this.InstallOperationCompleted, userState);
|
||||
parameters,
|
||||
languageId}, this.InstallOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnInstallOperationCompleted(object arg) {
|
||||
|
@ -416,33 +606,46 @@ namespace WebsitePanel.EnterpriseServer {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
public delegate void InitFeedsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.1432")]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
public delegate void SetResourceLanguageCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
public delegate void GetGalleryLanguagesCompletedEventHandler(object sender, GetGalleryLanguagesCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class GetGalleryLanguagesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||
|
||||
private object[] results;
|
||||
|
||||
internal GetGalleryLanguagesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||
base(exception, cancelled, userState) {
|
||||
this.results = results;
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public GalleryLanguagesResult Result {
|
||||
get {
|
||||
this.RaiseExceptionIfNecessary();
|
||||
return ((GalleryLanguagesResult)(this.results[0]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
public delegate void GetGalleryApplicationsByServiceIdCompletedEventHandler(object sender, GetGalleryApplicationsByServiceIdCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.1432")]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class GetGalleryApplicationsByServiceIdCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||
|
@ -464,11 +667,11 @@ namespace WebsitePanel.EnterpriseServer {
|
|||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.1432")]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
public delegate void GetGalleryApplicationsCompletedEventHandler(object sender, GetGalleryApplicationsCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.1432")]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class GetGalleryApplicationsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||
|
@ -490,11 +693,37 @@ namespace WebsitePanel.EnterpriseServer {
|
|||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.1432")]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
public delegate void GetGalleryApplicationsFilteredCompletedEventHandler(object sender, GetGalleryApplicationsFilteredCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class GetGalleryApplicationsFilteredCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||
|
||||
private object[] results;
|
||||
|
||||
internal GetGalleryApplicationsFilteredCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||
base(exception, cancelled, userState) {
|
||||
this.results = results;
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public GalleryApplicationsResult Result {
|
||||
get {
|
||||
this.RaiseExceptionIfNecessary();
|
||||
return ((GalleryApplicationsResult)(this.results[0]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
public delegate void GetGalleryCategoriesCompletedEventHandler(object sender, GetGalleryCategoriesCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.1432")]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class GetGalleryCategoriesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||
|
@ -516,11 +745,11 @@ namespace WebsitePanel.EnterpriseServer {
|
|||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.1432")]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
public delegate void GetGalleryApplicationDetailsCompletedEventHandler(object sender, GetGalleryApplicationDetailsCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.1432")]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class GetGalleryApplicationDetailsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||
|
@ -542,11 +771,11 @@ namespace WebsitePanel.EnterpriseServer {
|
|||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.1432")]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
public delegate void GetGalleryApplicationParamsCompletedEventHandler(object sender, GetGalleryApplicationParamsCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.1432")]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class GetGalleryApplicationParamsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||
|
@ -568,11 +797,11 @@ namespace WebsitePanel.EnterpriseServer {
|
|||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.1432")]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
public delegate void InstallCompletedEventHandler(object sender, InstallCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.1432")]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class InstallCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||
|
@ -594,11 +823,11 @@ namespace WebsitePanel.EnterpriseServer {
|
|||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.1432")]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
public delegate void GetGalleryApplicationStatusCompletedEventHandler(object sender, GetGalleryApplicationStatusCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.1432")]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class GetGalleryApplicationStatusCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||
|
|
|
@ -39,6 +39,7 @@ using WebsitePanel.Server;
|
|||
using WebsitePanel.Providers;
|
||||
using WebsitePanel.Providers.OS;
|
||||
using OS = WebsitePanel.Providers.OS;
|
||||
using System.Collections;
|
||||
|
||||
namespace WebsitePanel.EnterpriseServer
|
||||
{
|
||||
|
@ -406,6 +407,67 @@ namespace WebsitePanel.EnterpriseServer
|
|||
}
|
||||
#endregion
|
||||
|
||||
#region Web Platform Installer
|
||||
|
||||
public static void InitWPIFeeds(int serverId, string feedUrls)
|
||||
{
|
||||
GetServerService(serverId).InitWPIFeeds(feedUrls);
|
||||
}
|
||||
|
||||
public static WPITab[] GetWPITabs(int serverId)
|
||||
{
|
||||
return GetServerService(serverId).GetWPITabs();
|
||||
}
|
||||
|
||||
public static WPIKeyword[] GetWPIKeywords(int serverId)
|
||||
{
|
||||
return GetServerService(serverId).GetWPIKeywords();
|
||||
}
|
||||
|
||||
public static WPIProduct[] GetWPIProducts(int serverId, string tabId, string keywordId)
|
||||
{
|
||||
return GetServerService(serverId).GetWPIProducts(tabId, keywordId);
|
||||
}
|
||||
|
||||
public static WPIProduct[] GetWPIProductsFiltered(int serverId, string keywordId)
|
||||
{
|
||||
return GetServerService(serverId).GetWPIProductsFiltered(keywordId);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static WPIProduct[] GetWPIProductsWithDependencies(int serverId, string[] products)
|
||||
{
|
||||
return GetServerService(serverId).GetWPIProductsWithDependencies(products);
|
||||
}
|
||||
public static void InstallWPIProducts(int serverId, string[] products)
|
||||
{
|
||||
GetServerService(serverId).InstallWPIProducts(products);
|
||||
}
|
||||
|
||||
public static void CancelInstallWPIProducts(int serverId)
|
||||
{
|
||||
GetServerService(serverId).CancelInstallWPIProducts();
|
||||
}
|
||||
|
||||
public static string GetWPIStatus(int serverId)
|
||||
{
|
||||
return GetServerService(serverId).GetWPIStatus();
|
||||
}
|
||||
|
||||
public static string WpiGetLogFileDirectory(int serverId)
|
||||
{
|
||||
return GetServerService(serverId).WpiGetLogFileDirectory();
|
||||
}
|
||||
|
||||
public static SettingPair[] WpiGetLogsInDirectory(int serverId, string Path)
|
||||
{
|
||||
return GetServerService(serverId).WpiGetLogsInDirectory(Path);
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region Event Viewer
|
||||
public static string[] GetLogNames(int serverId)
|
||||
{
|
||||
|
@ -684,6 +746,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
@ -62,6 +62,88 @@ namespace WebsitePanel.EnterpriseServer
|
|||
public const string GET_GALLERY_CATEGORIES_TASK = "GET_GALLERY_CATEGORIES_TASK";
|
||||
#endregion
|
||||
|
||||
private static string[] getFeedsFromSettings(int packageId)
|
||||
{
|
||||
int serviceId = PackageController.GetPackageServiceId(packageId, ResourceGroups.Web);
|
||||
|
||||
return getFeedsFromSettingsByServiceId(serviceId);
|
||||
|
||||
}
|
||||
|
||||
private static string[] getFeedsFromSettingsByServiceId(int serviceId)
|
||||
{
|
||||
StringDictionary serviceSettings = ServerController.GetServiceSettings(serviceId);
|
||||
|
||||
List<string> arFeeds = new List<string>();
|
||||
|
||||
if (Utils.ParseBool(serviceSettings["FeedEnableMicrosoft"], true))
|
||||
{
|
||||
arFeeds.Add("https://www.microsoft.com/web/webpi/3.0/WebProductList.xml");
|
||||
}
|
||||
|
||||
if (Utils.ParseBool(serviceSettings["FeedEnableHelicon"], true))
|
||||
{
|
||||
arFeeds.Add("http://www.helicontech.com/zoo/feed/wsp");
|
||||
}
|
||||
|
||||
string additionalFeeds = serviceSettings["FeedUrls"];
|
||||
if (!string.IsNullOrEmpty(additionalFeeds))
|
||||
{
|
||||
arFeeds.AddRange(additionalFeeds.Split(';'));
|
||||
}
|
||||
|
||||
return arFeeds.ToArray();
|
||||
}
|
||||
public static void InitFeedsByServiceId(int UserId, int serviceId)
|
||||
{
|
||||
string[] feeds = getFeedsFromSettingsByServiceId(serviceId);
|
||||
|
||||
WebServer webServer = WebServerController.GetWebServer(serviceId);
|
||||
webServer.InitFeeds(UserId, feeds);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static void InitFeeds(int UserId, int packageId)
|
||||
{
|
||||
string[] feeds = getFeedsFromSettings(packageId);
|
||||
|
||||
// Set feeds
|
||||
WebServer webServer = GetAssociatedWebServer(packageId);
|
||||
webServer.InitFeeds(UserId, feeds);
|
||||
|
||||
}
|
||||
|
||||
public static void SetResourceLanguage(int packageId, string resourceLanguage)
|
||||
{
|
||||
GetAssociatedWebServer(packageId).SetResourceLanguage(SecurityContext.User.UserId,resourceLanguage);
|
||||
}
|
||||
|
||||
|
||||
public static GalleryLanguagesResult GetGalleryLanguages(int packageId)
|
||||
{
|
||||
GalleryLanguagesResult result;
|
||||
|
||||
try
|
||||
{
|
||||
WebServer webServer = GetAssociatedWebServer(packageId);
|
||||
result = webServer.GetGalleryLanguages(SecurityContext.User.UserId);
|
||||
|
||||
if (!result.IsSuccess)
|
||||
return Error<GalleryLanguagesResult>(result, GalleryErrors.GetLanguagesError);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return Error<GalleryLanguagesResult>(GalleryErrors.GetLanguagesError, ex.Message);
|
||||
}
|
||||
finally
|
||||
{
|
||||
}
|
||||
//
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
public static GalleryCategoriesResult GetGalleryCategories(int packageId)
|
||||
{
|
||||
GalleryCategoriesResult result;
|
||||
|
@ -77,7 +159,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return Error<GalleryCategoriesResult>(GalleryErrors.MsDeployIsNotInstalled);
|
||||
|
||||
// get categories
|
||||
result = webServer.GetGalleryCategories();
|
||||
result = webServer.GetGalleryCategories(SecurityContext.User.UserId);
|
||||
|
||||
if (!result.IsSuccess)
|
||||
return Error<GalleryCategoriesResult>(result, GalleryErrors.GetCategoriesError);
|
||||
|
@ -114,7 +196,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return Error<GalleryApplicationsResult>(GalleryErrors.MsDeployIsNotInstalled);
|
||||
|
||||
// get applications
|
||||
result = webServer.GetGalleryApplications(String.Empty);
|
||||
result = webServer.GetGalleryApplications(SecurityContext.User.UserId,String.Empty);
|
||||
|
||||
if (!result.IsSuccess)
|
||||
return Error<GalleryApplicationsResult>(result, GalleryErrors.GetApplicationsError);
|
||||
|
@ -132,7 +214,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return result;
|
||||
}
|
||||
|
||||
public static GalleryApplicationsResult GetGalleryApplications(int packageId, string categoryId)
|
||||
public static GalleryApplicationsResult GetGalleryApplications(int packageId, string categoryId)
|
||||
{
|
||||
GalleryApplicationsResult result;
|
||||
//
|
||||
|
@ -146,7 +228,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return Error<GalleryApplicationsResult>(GalleryErrors.MsDeployIsNotInstalled);
|
||||
|
||||
// get applications
|
||||
result = webServer.GetGalleryApplications(categoryId);
|
||||
result = webServer.GetGalleryApplications(SecurityContext.User.UserId,categoryId);
|
||||
|
||||
if (!result.IsSuccess)
|
||||
return Error<GalleryApplicationsResult>(result, GalleryErrors.GetApplicationsError);
|
||||
|
@ -189,20 +271,8 @@ namespace WebsitePanel.EnterpriseServer
|
|||
// || MatchMenaltoGalleryApp(x, appsFilter.ToArray())));
|
||||
|
||||
{
|
||||
int userId = SecurityContext.User.UserId;
|
||||
//
|
||||
SecurityContext.SetThreadSupervisorPrincipal();
|
||||
//
|
||||
string[] filteredApps = GetServiceAppsCatalogFilter(packageId);
|
||||
//
|
||||
if (filteredApps != null)
|
||||
{
|
||||
result.Value = new List<GalleryApplication>(Array.FindAll(result.Value.ToArray(),
|
||||
x => !Array.Exists(filteredApps,
|
||||
z => z.Equals(x.Id, StringComparison.InvariantCultureIgnoreCase))));
|
||||
}
|
||||
//
|
||||
SecurityContext.SetThreadPrincipal(userId);
|
||||
FilterResultApplications(packageId, result);
|
||||
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
@ -218,6 +288,61 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return result;
|
||||
}
|
||||
|
||||
private static void FilterResultApplications(int packageId, GalleryApplicationsResult result)
|
||||
{
|
||||
int userId = SecurityContext.User.UserId;
|
||||
//
|
||||
SecurityContext.SetThreadSupervisorPrincipal();
|
||||
//
|
||||
string[] filteredApps = GetServiceAppsCatalogFilter(packageId);
|
||||
//
|
||||
if (filteredApps != null)
|
||||
{
|
||||
result.Value = new List<GalleryApplication>(Array.FindAll(result.Value.ToArray(),
|
||||
x => !Array.Exists(filteredApps,
|
||||
z => z.Equals(x.Id, StringComparison.InvariantCultureIgnoreCase))));
|
||||
}
|
||||
//
|
||||
SecurityContext.SetThreadPrincipal(userId);
|
||||
}
|
||||
|
||||
public static GalleryApplicationsResult GetGalleryApplicationsFiltered(int packageId, string pattern)
|
||||
{
|
||||
GalleryApplicationsResult result;
|
||||
//
|
||||
try
|
||||
{
|
||||
TaskManager.StartTask(TASK_MANAGER_SOURCE, GET_GALLERY_APPS_TASK);
|
||||
|
||||
// check if WAG is installed
|
||||
WebServer webServer = GetAssociatedWebServer(packageId);
|
||||
if (!webServer.IsMsDeployInstalled())
|
||||
return Error<GalleryApplicationsResult>(GalleryErrors.MsDeployIsNotInstalled);
|
||||
|
||||
// get applications
|
||||
result = webServer.GetGalleryApplicationsFiltered(SecurityContext.User.UserId,pattern);
|
||||
|
||||
FilterResultApplications(packageId, result);
|
||||
|
||||
if (!result.IsSuccess)
|
||||
return Error<GalleryApplicationsResult>(result, GalleryErrors.GetApplicationsError);
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
TaskManager.WriteError(ex);
|
||||
return Error<GalleryApplicationsResult>(GalleryErrors.GeneralError, ex.Message);
|
||||
}
|
||||
finally
|
||||
{
|
||||
TaskManager.CompleteTask();
|
||||
}
|
||||
//
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
|
||||
internal static bool MatchParticularAppDependency(Dependency dependency, string[] dependencyIds)
|
||||
{
|
||||
List<Dependency> nested = null;
|
||||
|
@ -311,7 +436,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return Error<GalleryApplicationResult>(GalleryErrors.MsDeployIsNotInstalled);
|
||||
|
||||
// get application details
|
||||
result = webServer.GetGalleryApplication(applicationId);
|
||||
result = webServer.GetGalleryApplication(SecurityContext.User.UserId,applicationId);
|
||||
|
||||
if (!result.IsSuccess)
|
||||
return Error<GalleryApplicationResult>(result, GalleryErrors.GetApplicationError);
|
||||
|
@ -396,7 +521,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return Error<DeploymentParametersResult>(GalleryErrors.MsDeployIsNotInstalled);
|
||||
|
||||
// get parameters
|
||||
result = webServer.GetGalleryApplicationParameters(webAppId);
|
||||
result = webServer.GetGalleryApplicationParameters(SecurityContext.User.UserId,webAppId);
|
||||
|
||||
if (!result.IsSuccess)
|
||||
return Error<DeploymentParametersResult>(result, GalleryErrors.GetApplicationParametersError);
|
||||
|
@ -414,9 +539,10 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return result;
|
||||
}
|
||||
|
||||
public static StringResultObject Install(int packageId, string webAppId, string siteName, string virtualDir, List<DeploymentParameter> parameters)
|
||||
public static StringResultObject Install(int packageId, string webAppId, string siteName, string virtualDir, List<DeploymentParameter> parameters, string languageId )
|
||||
{
|
||||
StringResultObject result = new StringResultObject();
|
||||
int originalUserId = SecurityContext.User.UserId;
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -455,7 +581,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return Error<StringResultObject>(GalleryErrors.WebSiteNotFound, siteName);
|
||||
|
||||
// get application pack details
|
||||
GalleryApplicationResult app = webServer.GetGalleryApplication(webAppId);
|
||||
GalleryApplicationResult app = webServer.GetGalleryApplication(SecurityContext.User.UserId,webAppId);
|
||||
if (!app.IsSuccess)
|
||||
return Error<StringResultObject>(app, GalleryErrors.GeneralError);
|
||||
if (app.Value == null)
|
||||
|
@ -643,7 +769,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
}
|
||||
|
||||
// install application
|
||||
result = webServer.InstallGalleryApplication(webAppId, parameters.ToArray());
|
||||
result = webServer.InstallGalleryApplication(originalUserId, webAppId, parameters.ToArray(), languageId);
|
||||
|
||||
#region Rollback in case of failure
|
||||
// Rollback - remove resources have been created previously
|
||||
|
@ -665,12 +791,25 @@ namespace WebsitePanel.EnterpriseServer
|
|||
#region Update Web Application settings
|
||||
|
||||
WebVirtualDirectory iisApp = null;
|
||||
if(String.IsNullOrEmpty(virtualDir))
|
||||
// load web site
|
||||
iisApp = WebServerController.GetWebSite(packageId, siteName);
|
||||
else
|
||||
// load virtual directory
|
||||
iisApp = WebServerController.GetVirtualDirectory(webSite.Id, virtualDir);
|
||||
if (String.IsNullOrEmpty(virtualDir))
|
||||
// load web site
|
||||
iisApp = WebServerController.GetWebSite(packageId, siteName);
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
// load virtual directory
|
||||
iisApp = WebServerController.GetVirtualDirectory(webSite.Id, virtualDir);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new Exception(
|
||||
string.Format(
|
||||
"{0} on WebServerController.GetVirtualDirectory(\"{1}\", \"{2}\")",
|
||||
ex.GetType(), webSite.Id, virtualDir),
|
||||
ex);
|
||||
}
|
||||
}
|
||||
|
||||
// put correct extensions
|
||||
if ((app.Value.WellKnownDependencies & GalleryApplicationWellKnownDependency.AspNet20) == GalleryApplicationWellKnownDependency.AspNet20)
|
||||
|
@ -714,7 +853,10 @@ namespace WebsitePanel.EnterpriseServer
|
|||
TaskManager.WriteError(ex);
|
||||
|
||||
// exit with error code
|
||||
return Error<StringResultObject>(GalleryErrors.GeneralError);
|
||||
//return Error<StringResultObject>(GalleryErrors.GeneralError);
|
||||
|
||||
result.AddError(GalleryErrors.GeneralError, ex);
|
||||
return result;
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
@ -746,11 +888,11 @@ namespace WebsitePanel.EnterpriseServer
|
|||
if (!webServer.IsMsDeployInstalled())
|
||||
return Error<GalleryWebAppStatus>(GalleryErrors.MsDeployIsNotInstalled);
|
||||
//
|
||||
GalleryWebAppStatus appStatus = webServer.GetGalleryApplicationStatus(webAppId);
|
||||
GalleryWebAppStatus appStatus = webServer.GetGalleryApplicationStatus(SecurityContext.User.UserId,webAppId);
|
||||
//
|
||||
if (appStatus == GalleryWebAppStatus.NotDownloaded)
|
||||
{
|
||||
GalleryApplicationResult appResult = webServer.GetGalleryApplication(webAppId);
|
||||
GalleryApplicationResult appResult = webServer.GetGalleryApplication(SecurityContext.User.UserId,webAppId);
|
||||
// Start app download in new thread
|
||||
WebAppGalleryAsyncWorker async = new WebAppGalleryAsyncWorker();
|
||||
async.GalleryApp = appResult.Value;
|
||||
|
@ -897,7 +1039,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
//
|
||||
TaskManager.Write("Application package download has been started");
|
||||
//
|
||||
GalleryWebAppStatus appStatus = webServer.DownloadGalleryApplication(WebAppId);
|
||||
GalleryWebAppStatus appStatus = webServer.DownloadGalleryApplication(SecurityContext.User.UserId,WebAppId);
|
||||
//
|
||||
if (appStatus == GalleryWebAppStatus.Failed)
|
||||
{
|
||||
|
|
|
@ -41,6 +41,7 @@ using Microsoft.Web.Services3;
|
|||
using WebsitePanel.Providers.DNS;
|
||||
using WebsitePanel.Server;
|
||||
using WebsitePanel.Providers.ResultObjects;
|
||||
using WebsitePanel.Providers;
|
||||
|
||||
namespace WebsitePanel.EnterpriseServer
|
||||
{
|
||||
|
@ -663,6 +664,108 @@ namespace WebsitePanel.EnterpriseServer
|
|||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region Web Platform Installer
|
||||
|
||||
[WebMethod]
|
||||
public void InitWPIFeeds(int serverId)
|
||||
{
|
||||
var wpiSettings = SystemController.GetSystemSettings(SystemSettings.WPI_SETTINGS);
|
||||
|
||||
|
||||
List<string> arFeeds = new List<string>();
|
||||
|
||||
if (Utils.ParseBool(wpiSettings["FeedEnableMicrosoft"] ,true))
|
||||
{
|
||||
arFeeds.Add( "https://www.microsoft.com/web/webpi/3.0/WebProductList.xml" );
|
||||
}
|
||||
|
||||
if (Utils.ParseBool(wpiSettings["FeedEnableHelicon"] ,true))
|
||||
{
|
||||
arFeeds.Add( "http://www.helicontech.com/zoo/feed/wsp" );
|
||||
}
|
||||
|
||||
string additionalFeeds = wpiSettings["FeedUrls"];
|
||||
if (!string.IsNullOrEmpty(additionalFeeds))
|
||||
{
|
||||
arFeeds.AddRange(additionalFeeds.Split(';'));
|
||||
}
|
||||
|
||||
OperatingSystemController.InitWPIFeeds(serverId, string.Join(";", arFeeds));
|
||||
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public WPITab[] GetWPITabs(int serverId)
|
||||
{
|
||||
InitWPIFeeds(serverId);
|
||||
return OperatingSystemController.GetWPITabs(serverId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public WPIKeyword[] GetWPIKeywords(int serverId)
|
||||
{
|
||||
InitWPIFeeds(serverId);
|
||||
return OperatingSystemController.GetWPIKeywords(serverId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public WPIProduct[] GetWPIProducts(int serverId, string tabId, string keywordId)
|
||||
{
|
||||
InitWPIFeeds(serverId);
|
||||
return OperatingSystemController.GetWPIProducts(serverId, tabId, keywordId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public WPIProduct[] GetWPIProductsFiltered(int serverId, string keywordId)
|
||||
{
|
||||
InitWPIFeeds(serverId);
|
||||
return OperatingSystemController.GetWPIProductsFiltered(serverId, keywordId);
|
||||
}
|
||||
|
||||
|
||||
[WebMethod]
|
||||
public WPIProduct[] GetWPIProductsWithDependencies(int serverId, string[] products)
|
||||
{
|
||||
InitWPIFeeds(serverId);
|
||||
return OperatingSystemController.GetWPIProductsWithDependencies(serverId, products);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public void InstallWPIProducts(int serverId, string[] products)
|
||||
{
|
||||
InitWPIFeeds(serverId);
|
||||
OperatingSystemController.InstallWPIProducts(serverId, products);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public void CancelInstallWPIProducts(int serviceId)
|
||||
{
|
||||
OperatingSystemController.CancelInstallWPIProducts(serviceId);
|
||||
}
|
||||
|
||||
|
||||
[WebMethod]
|
||||
public string GetWPIStatus(int serverId)
|
||||
{
|
||||
return OperatingSystemController.GetWPIStatus(serverId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public string WpiGetLogFileDirectory(int serverId)
|
||||
{
|
||||
return OperatingSystemController.WpiGetLogFileDirectory(serverId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public SettingPair[] WpiGetLogsInDirectory(int serverId, string Path)
|
||||
{
|
||||
return OperatingSystemController.WpiGetLogsInDirectory(serverId, Path);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#region Windows Services
|
||||
[WebMethod]
|
||||
public WindowsService[] GetWindowsServices(int serverId)
|
||||
|
|
|
@ -43,45 +43,81 @@ namespace WebsitePanel.EnterpriseServer
|
|||
[System.ComponentModel.ToolboxItem(false)]
|
||||
public class esWebApplicationGallery : System.Web.Services.WebService
|
||||
{
|
||||
[WebMethod]
|
||||
public void InitFeeds(int packageId)
|
||||
{
|
||||
WebAppGalleryController.InitFeeds(SecurityContext.User.UserId, packageId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public void SetResourceLanguage(int packageId, string resourceLanguage)
|
||||
{
|
||||
WebAppGalleryController.InitFeeds(SecurityContext.User.UserId, packageId);
|
||||
WebAppGalleryController.SetResourceLanguage(packageId, resourceLanguage);
|
||||
}
|
||||
|
||||
|
||||
[WebMethod]
|
||||
public GalleryLanguagesResult GetGalleryLanguages(int packageId)
|
||||
{
|
||||
WebAppGalleryController.InitFeeds(SecurityContext.User.UserId, packageId);
|
||||
return WebAppGalleryController.GetGalleryLanguages(packageId);
|
||||
}
|
||||
|
||||
|
||||
[WebMethod]
|
||||
public GalleryApplicationsResult GetGalleryApplicationsByServiceId(int serviceId)
|
||||
{
|
||||
WebAppGalleryController.InitFeedsByServiceId(SecurityContext.User.UserId, serviceId);
|
||||
return WebAppGalleryController.GetGalleryApplicationsByServiceId(serviceId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public GalleryApplicationsResult GetGalleryApplications(int packageId, string categoryId)
|
||||
{
|
||||
return WebAppGalleryController.GetGalleryApplications(packageId, categoryId);
|
||||
WebAppGalleryController.InitFeeds(SecurityContext.User.UserId, packageId);
|
||||
return WebAppGalleryController.GetGalleryApplications(packageId, categoryId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public GalleryApplicationsResult GetGalleryApplicationsFiltered(int packageId, string pattern)
|
||||
{
|
||||
WebAppGalleryController.InitFeeds(SecurityContext.User.UserId, packageId);
|
||||
return WebAppGalleryController.GetGalleryApplicationsFiltered(packageId, pattern);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public GalleryCategoriesResult GetGalleryCategories(int packageId)
|
||||
{
|
||||
WebAppGalleryController.InitFeeds(SecurityContext.User.UserId, packageId);
|
||||
return WebAppGalleryController.GetGalleryCategories(packageId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public GalleryApplicationResult GetGalleryApplicationDetails(int packageId, string applicationId)
|
||||
{
|
||||
WebAppGalleryController.InitFeeds(SecurityContext.User.UserId, packageId);
|
||||
return WebAppGalleryController.GetGalleryApplicationDetails(packageId, applicationId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public DeploymentParametersResult GetGalleryApplicationParams(int packageId, string applicationId)
|
||||
{
|
||||
WebAppGalleryController.InitFeeds(SecurityContext.User.UserId, packageId);
|
||||
return WebAppGalleryController.GetGalleryApplicationParams(packageId, applicationId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public StringResultObject Install(int packageId, string webAppId, string siteName, string virtualDir, List<DeploymentParameter> parameters)
|
||||
public StringResultObject Install(int packageId, string webAppId, string siteName, string virtualDir, List<DeploymentParameter> parameters, string languageId)
|
||||
{
|
||||
return WebAppGalleryController.Install(packageId, webAppId, siteName, virtualDir, parameters);
|
||||
WebAppGalleryController.InitFeeds(SecurityContext.User.UserId, packageId);
|
||||
return WebAppGalleryController.Install(packageId, webAppId, siteName, virtualDir, parameters, languageId);
|
||||
}
|
||||
|
||||
[WebMethod(Description="Returns Web Application Gallery application status, such as Downloaded, Downloading, Failed or NotDownloaded. Throws an ApplicationException if WAG module is not available on the target server.")]
|
||||
public GalleryWebAppStatus GetGalleryApplicationStatus(int packageId, string webAppId)
|
||||
{
|
||||
WebAppGalleryController.InitFeeds(SecurityContext.User.UserId, packageId);
|
||||
return WebAppGalleryController.GetGalleryApplicationStatus(packageId, webAppId);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,214 @@
|
|||
// 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.
|
||||
//
|
||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// - Neither the name of the Outercurve Foundation nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace WebsitePanel.Server
|
||||
{
|
||||
public class WPIProduct
|
||||
{
|
||||
private string productId;
|
||||
private string logo;
|
||||
private string summary;
|
||||
private string title;
|
||||
private string link;
|
||||
private string version;
|
||||
private string eulaUrl;
|
||||
private string downloadedLocation;
|
||||
private string longDescription;
|
||||
private bool isInstalled;
|
||||
private int fileSize;
|
||||
private DateTime published;
|
||||
private string author;
|
||||
private string authorUri;
|
||||
|
||||
public WPIProduct()
|
||||
{
|
||||
}
|
||||
|
||||
public string Logo
|
||||
{
|
||||
get { return this.logo; }
|
||||
set { this.logo = value; }
|
||||
}
|
||||
|
||||
public string ProductId
|
||||
{
|
||||
get { return this.productId; }
|
||||
set { this.productId = value; }
|
||||
}
|
||||
|
||||
|
||||
public string Summary
|
||||
{
|
||||
get { return this.summary; }
|
||||
set { this.summary = value; }
|
||||
}
|
||||
|
||||
public string Title
|
||||
{
|
||||
get { return this.title; }
|
||||
set { this.title = value; }
|
||||
}
|
||||
|
||||
public string Link
|
||||
{
|
||||
get { return this.link; }
|
||||
set { this.link = value; }
|
||||
}
|
||||
|
||||
public bool IsInstalled
|
||||
{
|
||||
get { return this.isInstalled; }
|
||||
set { this.isInstalled = value; }
|
||||
}
|
||||
|
||||
public string Version
|
||||
{
|
||||
get { return this.version; }
|
||||
set { this.version = value; }
|
||||
}
|
||||
|
||||
public string EulaUrl
|
||||
{
|
||||
get { return this.eulaUrl; }
|
||||
set { this.eulaUrl = value; }
|
||||
}
|
||||
|
||||
public string DownloadedLocation
|
||||
{
|
||||
get { return this.downloadedLocation; }
|
||||
set { this.downloadedLocation = value; }
|
||||
}
|
||||
|
||||
public int FileSize
|
||||
{
|
||||
get { return this.fileSize; }
|
||||
set { this.fileSize = value; }
|
||||
}
|
||||
|
||||
public string LongDescription
|
||||
{
|
||||
get { return this.longDescription; }
|
||||
set { this.longDescription = value; }
|
||||
}
|
||||
|
||||
public DateTime Published
|
||||
{
|
||||
get { return this.published; }
|
||||
set { this.published = value; }
|
||||
}
|
||||
|
||||
public string Author
|
||||
{
|
||||
get { return author; }
|
||||
set { author = value; }
|
||||
}
|
||||
|
||||
public string AuthorUri
|
||||
{
|
||||
get { return authorUri; }
|
||||
set { authorUri = value; }
|
||||
}
|
||||
}
|
||||
|
||||
public class WPITab
|
||||
{
|
||||
private string description;
|
||||
private bool fromCustomFeed;
|
||||
private string id;
|
||||
private string name;
|
||||
|
||||
public WPITab()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public WPITab(string id, string name)
|
||||
{
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public string Description
|
||||
{
|
||||
get { return this.description; }
|
||||
set { this.description = value; }
|
||||
}
|
||||
|
||||
public bool FromCustomFeed
|
||||
{
|
||||
get { return this.fromCustomFeed; }
|
||||
set { this.fromCustomFeed = value; }
|
||||
}
|
||||
|
||||
public string Id
|
||||
{
|
||||
get { return this.id; }
|
||||
set { this.id = value; }
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
get { return this.name; }
|
||||
set { this.name = value; }
|
||||
}
|
||||
}
|
||||
|
||||
public class WPIKeyword
|
||||
{
|
||||
private string id;
|
||||
private string text;
|
||||
|
||||
public WPIKeyword()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public WPIKeyword(string id, string text)
|
||||
{
|
||||
this.id = id;
|
||||
this.text = text;
|
||||
}
|
||||
|
||||
public string Id
|
||||
{
|
||||
get { return this.id; }
|
||||
set { this.id = value; }
|
||||
}
|
||||
|
||||
public string Text
|
||||
{
|
||||
get { return this.text; }
|
||||
set { this.text = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -57,7 +57,7 @@ namespace WebsitePanel.Providers.Common
|
|||
public void AddError(string errorCode, Exception ex)
|
||||
{
|
||||
if(ex != null)
|
||||
errorCode += ":" + ex.Message;
|
||||
errorCode += ":" + ex.Message + "; " + ex.StackTrace;
|
||||
|
||||
this.ErrorCodes.Add(errorCode);
|
||||
this.IsSuccess = false;
|
||||
|
|
|
@ -47,4 +47,8 @@ namespace WebsitePanel.Providers.ResultObjects
|
|||
public class DeploymentParametersResult : ValueResultObject<List<DeploymentParameter>>
|
||||
{
|
||||
}
|
||||
|
||||
public class GalleryLanguagesResult : ValueResultObject<List<SettingPair>>
|
||||
{
|
||||
}
|
||||
}
|
|
@ -119,14 +119,18 @@ namespace WebsitePanel.Providers.Web
|
|||
|
||||
|
||||
// web app gallery
|
||||
void InitFeeds(int UserId, string[] feeds);
|
||||
void SetResourceLanguage(int UserId, string resourceLanguage);
|
||||
bool IsMsDeployInstalled();
|
||||
GalleryCategoriesResult GetGalleryCategories();
|
||||
GalleryApplicationsResult GetGalleryApplications(string categoryId);
|
||||
GalleryApplicationResult GetGalleryApplication(string id);
|
||||
GalleryWebAppStatus GetGalleryApplicationStatus(string id);
|
||||
GalleryWebAppStatus DownloadGalleryApplication(string id);
|
||||
DeploymentParametersResult GetGalleryApplicationParameters(string id);
|
||||
StringResultObject InstallGalleryApplication(string id, List<DeploymentParameter> updatedValues);
|
||||
GalleryLanguagesResult GetGalleryLanguages(int UserId);
|
||||
GalleryCategoriesResult GetGalleryCategories(int UserId);
|
||||
GalleryApplicationsResult GetGalleryApplications(int UserId, string categoryId);
|
||||
GalleryApplicationsResult GetGalleryApplicationsFiltered(int UserId, string pattern);
|
||||
GalleryApplicationResult GetGalleryApplication(int UserId, string id);
|
||||
GalleryWebAppStatus GetGalleryApplicationStatus(int UserId, string id);
|
||||
GalleryWebAppStatus DownloadGalleryApplication(int UserId, string id);
|
||||
DeploymentParametersResult GetGalleryApplicationParameters(int UserId, string id);
|
||||
StringResultObject InstallGalleryApplication(int UserId, string id, List<DeploymentParameter> updatedValues, string languageId);
|
||||
|
||||
//
|
||||
void GrantWebManagementAccess(string siteId, string accountName, string accountPassword);
|
||||
|
|
|
@ -41,37 +41,48 @@ namespace WebsitePanel.Providers.WebAppGallery
|
|||
}
|
||||
|
||||
[Flags]
|
||||
public enum DeploymentParameterWellKnownTag
|
||||
public enum DeploymentParameterWellKnownTag : long
|
||||
{
|
||||
None = 0,
|
||||
AppHostConfig = 1,
|
||||
AppPoolConfig = 2,
|
||||
Boolean = 4,
|
||||
ComObject32 = 8,
|
||||
ComObject64 = 16,
|
||||
DBAdminPassword = 32,
|
||||
DBAdminUserName = 64,
|
||||
DBConnectionString = 128,
|
||||
DBName = 256,
|
||||
DBServer = 512,
|
||||
DBUserName = 1024,
|
||||
DBUserPassword = 2048,
|
||||
FlatFile = 4096,
|
||||
Hidden = 8192,
|
||||
IisApp = 16384,
|
||||
MetaKey = 32768,
|
||||
MySql = 65536,
|
||||
MySqlConnectionString = 131072,
|
||||
New = 262144,
|
||||
RegKey = 524288,
|
||||
SetAcl = 1048576,
|
||||
Sql = 2097152,
|
||||
SqLite = 4194304,
|
||||
SqlConnectionString = 8388608,
|
||||
Password = 16777216,
|
||||
PhysicalPath = 33554432,
|
||||
VistaDB = 67108864,
|
||||
Validate = 134217728,
|
||||
None = 0L,
|
||||
AppHostConfig = 1L,
|
||||
AppPoolConfig = 2L,
|
||||
Boolean = 4L,
|
||||
ComObject32 = 8L,
|
||||
ComObject64 = 16L,
|
||||
DBAdminPassword = 32L,
|
||||
DBAdminUserName = 64L,
|
||||
DBConnectionString = 128L,
|
||||
DBName = 256L,
|
||||
DBServer = 512L,
|
||||
DBUserName = 1024L,
|
||||
DBUserPassword = 2048L,
|
||||
FlatFile = 4096L,
|
||||
Hidden = 8192L,
|
||||
IisApp = 16384L,
|
||||
MetaKey = 32768L,
|
||||
MySql = 65536L,
|
||||
MySqlConnectionString = 131072L,
|
||||
New = 262144L,
|
||||
RegKey = 524288L,
|
||||
SetAcl = 1048576L,
|
||||
Sql = 2097152L,
|
||||
SqLite = 4194304L,
|
||||
SqlConnectionString = 8388608L,
|
||||
Password = 16777216L,
|
||||
PhysicalPath = 33554432L,
|
||||
VistaDB = 67108864L,
|
||||
Validate = 134217728L,
|
||||
SqLiteConnectionString = 268435456L,
|
||||
SqlCE = 536870912L,
|
||||
NoStore = 1073741824L,
|
||||
AppURL = 2147483648L,
|
||||
NoProtocol = 4294967296L,
|
||||
DBUserConnectionString = 8589934592L,
|
||||
DBAdminConnectionString = 17179869184L,
|
||||
WebPIApplicationID = 34359738368L,
|
||||
Ignore = 68719476736L,
|
||||
AutoGenerated = 137438953472L,
|
||||
SingleLineConnectionString = 274877906944L,
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
|
|
|
@ -203,7 +203,7 @@ namespace WebsitePanel.Providers.WebAppGallery
|
|||
}
|
||||
}
|
||||
|
||||
[XmlIgnore]
|
||||
[XmlIgnore]
|
||||
public string Size
|
||||
{
|
||||
get
|
||||
|
@ -217,6 +217,10 @@ namespace WebsitePanel.Providers.WebAppGallery
|
|||
}
|
||||
}
|
||||
|
||||
[XmlElement(ElementName = "installerFileSize", Namespace = "http://www.w3.org/2005/Atom")]
|
||||
public int InstallerFileSize { get; set; }
|
||||
|
||||
|
||||
public string AuthorName {
|
||||
get { return Author.Name; }
|
||||
}
|
||||
|
|
|
@ -53,6 +53,9 @@ namespace WebsitePanel.Providers.WebAppGallery
|
|||
public const string MsDeployIsNotInstalled = "MsDeployIsNotInstalled";
|
||||
public const string GeneralError = "GeneralError"; // + exception message
|
||||
|
||||
// Languages
|
||||
public const string GetLanguagesError = "GetLanguagesError";
|
||||
|
||||
// Categories
|
||||
public const string GetCategoriesError = "GetCategoriesError";
|
||||
|
||||
|
|
|
@ -74,6 +74,7 @@
|
|||
<Compile Include="Common\ByteOperations.cs" />
|
||||
<Compile Include="Common\ErrorCodes.cs" />
|
||||
<Compile Include="Common\PasswdHelper.cs" />
|
||||
<Compile Include="Common\WPIEntries.cs" />
|
||||
<Compile Include="HostedSolution\BaseReport.cs" />
|
||||
<Compile Include="HostedSolution\BaseStatistics.cs" />
|
||||
<Compile Include="HostedSolution\BlackBerryErrorsCodes.cs" />
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
<ItemGroup>
|
||||
<Reference Include="MySql.Data, Version=6.3.7.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\..\Program Files (x86)\MySQL\Connector NET 6.3.7\Assemblies\v2.0\MySql.Data.dll</HintPath>
|
||||
<HintPath>..\..\Lib\References\MySQL\MySql.Data.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
|
|
|
@ -59,6 +59,7 @@ using WebsitePanel.Providers.Web.WebObjects;
|
|||
using WebsitePanel.Providers.Web.Iis.Common;
|
||||
using WebsitePanel.Providers.Web.Iis;
|
||||
using Ionic.Zip;
|
||||
using WebsitePanel.Providers.WebAppGallery;
|
||||
using WebsitePanel.Server.Utils;
|
||||
using WebsitePanel.Providers.Web.Delegation;
|
||||
|
||||
|
@ -3176,7 +3177,7 @@ namespace WebsitePanel.Providers.Web
|
|||
public const string WDeployAppPoolConfigEditor = "WDeployAppPoolConfigEditor";
|
||||
|
||||
|
||||
private void SetupWebDeployPublishingOnServer(List<string> messages)
|
||||
private void SetupWebDeployPublishingOnServer(List<string> messages)
|
||||
{
|
||||
if (IsWebDeployInstalled() == false
|
||||
|| String.IsNullOrEmpty(ProviderSettings[WDeployEnabled]))
|
||||
|
@ -4026,5 +4027,11 @@ namespace WebsitePanel.Providers.Web
|
|||
return sslObjectService.CheckCertificate(webSite);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Web Platform Installer Application Gallery
|
||||
|
||||
// moved down to IIs60
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
@ -59,6 +59,7 @@
|
|||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\Lib\Ionic.Zip.Reduced.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Practices.EnterpriseLibrary.Caching, Version=3.1.0.0, Culture=neutral, processorArchitecture=MSIL" />
|
||||
<Reference Include="Microsoft.Web.Administration, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\Lib\References\Microsoft\Microsoft.Web.Administration.dll</HintPath>
|
||||
|
@ -67,6 +68,10 @@
|
|||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\Lib\References\Microsoft\Microsoft.Web.Management.dll</HintPath>
|
||||
</Reference>
|
||||
<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 Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.DirectoryServices" />
|
||||
|
|
|
@ -43,6 +43,7 @@ using System.IO;
|
|||
using Microsoft.Win32;
|
||||
using Microsoft.Web.Deployment;
|
||||
using WebsitePanel.Providers.HostedSolution;
|
||||
using WebsitePanel.Providers.Web.WPIWebApplicationGallery;
|
||||
using WebsitePanel.Server.Utils;
|
||||
using WebsitePanel.Providers.OS;
|
||||
using WebsitePanel.Providers.Utils;
|
||||
|
@ -283,7 +284,7 @@ namespace WebsitePanel.Providers.Web
|
|||
get
|
||||
{
|
||||
string ret = ProviderSettings["GalleryXmlFeedUrl"];
|
||||
if (string.IsNullOrEmpty(ret))
|
||||
if (String.IsNullOrEmpty(ret))
|
||||
ret = WebApplicationGallery.WAG_DEFAULT_FEED_URL;
|
||||
return ret;
|
||||
}
|
||||
|
@ -3386,246 +3387,209 @@ namespace WebsitePanel.Providers.Web
|
|||
return IsIISInstalled();
|
||||
}
|
||||
|
||||
#region Microsoft Web Application Gallery
|
||||
|
||||
#region Microsoft Web Application Gallery
|
||||
|
||||
public GalleryCategoriesResult GetGalleryCategories()
|
||||
{
|
||||
GalleryCategoriesResult result = new GalleryCategoriesResult();
|
||||
private const string MS_DEPLOY_ASSEMBLY_NAME = "Microsoft.Web.Deployment";
|
||||
private const string WPI_INSTANCE_VIEWER = "viewer";
|
||||
private const string WPI_INSTANCE_INSTALLER = "installer";
|
||||
|
||||
try
|
||||
{
|
||||
WebApplicationGallery module = new WebApplicationGallery(GalleryXmlFeedUrl);
|
||||
//
|
||||
result.Value = module.GetCategories();
|
||||
result.IsSuccess = true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
result.IsSuccess = false;
|
||||
result.AddError(GalleryErrors.ProcessingFeedXMLError, ex);
|
||||
}
|
||||
//
|
||||
return result;
|
||||
}
|
||||
public void InitFeeds(int UserId, string[] feeds)
|
||||
{
|
||||
//need to call InitFeeds() before any operation with WPIApplicationGallery()
|
||||
WPIApplicationGallery module = new WPIApplicationGallery(WPI_INSTANCE_VIEWER);
|
||||
module.InitFeeds(UserId, feeds);
|
||||
}
|
||||
|
||||
public GalleryApplicationsResult GetGalleryApplications(string categoryId)
|
||||
{
|
||||
GalleryApplicationsResult result = new GalleryApplicationsResult();
|
||||
public void SetResourceLanguage(int UserId, string resourceLanguage)
|
||||
{
|
||||
WPIApplicationGallery module = new WPIApplicationGallery(WPI_INSTANCE_VIEWER);
|
||||
module.SetResourceLanguage(UserId, resourceLanguage);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
WebApplicationGallery module = new WebApplicationGallery(GalleryXmlFeedUrl);
|
||||
//
|
||||
result.Value = module.GetApplications(categoryId);
|
||||
result.IsSuccess = true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
result.IsSuccess = false;
|
||||
result.AddError(GalleryErrors.ProcessingFeedXMLError, ex);
|
||||
}
|
||||
//
|
||||
return result;
|
||||
}
|
||||
public bool IsMsDeployInstalled()
|
||||
{
|
||||
// project has reference to Microsoft.Web.Deployment, so
|
||||
return true;
|
||||
/*
|
||||
try
|
||||
{
|
||||
Assembly.Load(MS_DEPLOY_ASSEMBLY_NAME);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{
|
||||
// type could not be instantiated
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
public GalleryApplicationResult GetGalleryApplication(string id)
|
||||
{
|
||||
GalleryApplicationResult result = new GalleryApplicationResult();
|
||||
//
|
||||
try
|
||||
{
|
||||
WebApplicationGallery module = new WebApplicationGallery(GalleryXmlFeedUrl);
|
||||
//
|
||||
result.Value = module.GetApplicationByProductId(id);
|
||||
result.IsSuccess = true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
result.IsSuccess = false;
|
||||
result.AddError(GalleryErrors.ProcessingFeedXMLError, ex);
|
||||
}
|
||||
//
|
||||
return result;
|
||||
}
|
||||
public GalleryLanguagesResult GetGalleryLanguages(int UserId)
|
||||
{
|
||||
GalleryLanguagesResult result = new GalleryLanguagesResult();
|
||||
WPIApplicationGallery module = new WPIApplicationGallery(WPI_INSTANCE_VIEWER);
|
||||
try
|
||||
{
|
||||
result.Value = module.GetLanguages(UserId);
|
||||
result.IsSuccess = true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
result.IsSuccess = false;
|
||||
result.AddError(GalleryErrors.GetLanguagesError, ex);
|
||||
}
|
||||
|
||||
public GalleryWebAppStatus GetGalleryApplicationStatus(string id)
|
||||
{
|
||||
GalleryWebAppStatus status = GalleryWebAppStatus.NotDownloaded;
|
||||
//
|
||||
try
|
||||
{
|
||||
WebApplicationGallery module = new WebApplicationGallery(GalleryXmlFeedUrl);
|
||||
//
|
||||
GalleryApplication appObject = module.GetApplicationByProductId(id);
|
||||
//
|
||||
if (appObject == null)
|
||||
return GalleryWebAppStatus.Failed;
|
||||
//
|
||||
string appPackageDistr = module.GetApplicationPackagePath(appObject);
|
||||
// Check whether distributive exists locally
|
||||
if (!File.Exists(appPackageDistr))
|
||||
return GalleryWebAppStatus.NotDownloaded;
|
||||
// Check whether distributive is in download queue
|
||||
if (AppPackagesDownloader.IsApplicationInDownloadQueue(id))
|
||||
return GalleryWebAppStatus.Downloading;
|
||||
// From this point distibutive is considered as existed locally and it's not in download queue,
|
||||
// so lets ensure the downloaded file either is not corrupted during the download process
|
||||
#region Atom Feed Version 0.2
|
||||
if (appObject.InstallerItems.Count > 0)
|
||||
{
|
||||
string md5CheckSum = appObject.InstallerItems[0].InstallerFile.MD5;
|
||||
// Check MD5 check sum of the distributive
|
||||
if (AppPackagesDownloader.CheckApplicationPackageHashSum_MD5(appPackageDistr, md5CheckSum))
|
||||
status = GalleryWebAppStatus.Downloaded;
|
||||
}
|
||||
#endregion
|
||||
return result;
|
||||
}
|
||||
|
||||
#region Atom Feed Version 2.0.1.0
|
||||
else if (appObject.Installers.Count > 0)
|
||||
{
|
||||
string sha1CheckSum = appObject.Installers[0].InstallerFile.SHA1;
|
||||
// Check SHA1 check sum of the distributive
|
||||
if (AppPackagesDownloader.CheckApplicationPackageHashSum_SHA1(appPackageDistr, sha1CheckSum))
|
||||
status = GalleryWebAppStatus.Downloaded;
|
||||
}
|
||||
#endregion
|
||||
// If MD5 check sum is failed then we have to resume distibutive download
|
||||
else
|
||||
status = GalleryWebAppStatus.NotDownloaded;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteError(ex);
|
||||
//
|
||||
return GalleryWebAppStatus.Failed;
|
||||
}
|
||||
//
|
||||
return status;
|
||||
}
|
||||
public GalleryCategoriesResult GetGalleryCategories(int UserId)
|
||||
{
|
||||
GalleryCategoriesResult result = new GalleryCategoriesResult();
|
||||
|
||||
public GalleryWebAppStatus DownloadGalleryApplication(string id)
|
||||
{
|
||||
WebApplicationGallery module = new WebApplicationGallery(GalleryXmlFeedUrl);
|
||||
//
|
||||
GalleryApplication appObject = module.GetApplicationByProductId(id);
|
||||
if (appObject == null)
|
||||
return GalleryWebAppStatus.Failed;
|
||||
//
|
||||
string localAppDistr = module.GetApplicationPackagePath(appObject);
|
||||
//
|
||||
InstallerFile installerFile = null;
|
||||
//try
|
||||
//{
|
||||
WPIApplicationGallery module = new WPIApplicationGallery(WPI_INSTANCE_VIEWER);
|
||||
//
|
||||
result.Value = module.GetCategories(UserId);
|
||||
result.IsSuccess = true;
|
||||
//}
|
||||
//catch (Exception ex)
|
||||
//{
|
||||
// result.IsSuccess = false;
|
||||
// result.AddError(GalleryErrors.ProcessingFeedXMLError, ex);
|
||||
//}
|
||||
////
|
||||
return result;
|
||||
}
|
||||
|
||||
#region Atom Feed Version 0.2
|
||||
//
|
||||
if (appObject.InstallerItems.Count > 0)
|
||||
{
|
||||
InstallerItem installerItem_0 = appObject.InstallerItems[0];
|
||||
//
|
||||
if (installerItem_0 == null)
|
||||
{
|
||||
Log.WriteWarning(WEB_PI_APP_PACK_ROOT_INSTALLER_ITEM_MISSING, appObject.Title);
|
||||
return GalleryWebAppStatus.Failed;
|
||||
}
|
||||
//
|
||||
installerFile = installerItem_0.InstallerFile;
|
||||
}
|
||||
#endregion
|
||||
public GalleryApplicationsResult GetGalleryApplications(int UserId, string categoryId)
|
||||
{
|
||||
GalleryApplicationsResult result = new GalleryApplicationsResult();
|
||||
|
||||
#region Atom Feed Version 2.0.1.0
|
||||
//
|
||||
if (appObject.Installers.Count > 0)
|
||||
{
|
||||
Installer installerItem_0 = appObject.Installers[0];
|
||||
//
|
||||
if (installerItem_0 == null)
|
||||
{
|
||||
Log.WriteWarning(WEB_PI_APP_PACK_ROOT_INSTALLER_ITEM_MISSING, appObject.Title);
|
||||
return GalleryWebAppStatus.Failed;
|
||||
}
|
||||
//
|
||||
installerFile = installerItem_0.InstallerFile;
|
||||
}
|
||||
#endregion
|
||||
try
|
||||
{
|
||||
WPIApplicationGallery module = new WPIApplicationGallery(WPI_INSTANCE_VIEWER);
|
||||
//
|
||||
result.Value = module.GetApplications(UserId, categoryId);
|
||||
result.IsSuccess = true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
result.IsSuccess = false;
|
||||
result.AddError(GalleryErrors.ProcessingFeedXMLError, ex);
|
||||
}
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
if (installerFile == null || String.IsNullOrEmpty(installerFile.InstallerUrl))
|
||||
{
|
||||
Log.WriteWarning(WEB_PI_APP_PACK_DISPLAY_URL_MISSING, appObject.Title);
|
||||
return GalleryWebAppStatus.Failed;
|
||||
}
|
||||
public GalleryApplicationsResult GetGalleryApplicationsFiltered(int UserId, string pattern)
|
||||
{
|
||||
GalleryApplicationsResult result = new GalleryApplicationsResult();
|
||||
|
||||
//
|
||||
try
|
||||
{
|
||||
string appCacheRoot = Path.GetDirectoryName(localAppDistr);
|
||||
//
|
||||
if (!Directory.Exists(appCacheRoot))
|
||||
Directory.CreateDirectory(appCacheRoot);
|
||||
//
|
||||
Log.WriteInfo("Local distributive path: {0}", localAppDistr);
|
||||
AppPackagesDownloader.StartApplicationDownload(id, installerFile.InstallerUrl, localAppDistr);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteError(ex);
|
||||
//
|
||||
return GalleryWebAppStatus.Failed;
|
||||
}
|
||||
//
|
||||
return GalleryWebAppStatus.Downloading;
|
||||
}
|
||||
try
|
||||
{
|
||||
WPIApplicationGallery module = new WPIApplicationGallery(WPI_INSTANCE_VIEWER);
|
||||
|
||||
public bool IsMsDeployInstalled()
|
||||
{
|
||||
WebApplicationGallery module = new WebApplicationGallery(GalleryXmlFeedUrl);
|
||||
//
|
||||
return module.IsMsDeployInstalled();
|
||||
}
|
||||
result.Value = module.GetGalleryApplicationsFiltered(UserId, pattern);
|
||||
result.IsSuccess = true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
result.IsSuccess = false;
|
||||
result.AddError(ex.Message, ex);
|
||||
}
|
||||
|
||||
public DeploymentParametersResult GetGalleryApplicationParameters(string id)
|
||||
{
|
||||
DeploymentParametersResult result = new DeploymentParametersResult();
|
||||
|
||||
try
|
||||
{
|
||||
WebApplicationGallery module = new WebApplicationGallery(GalleryXmlFeedUrl);
|
||||
//
|
||||
result.Value = module.GetApplicationParameters(id);
|
||||
result.IsSuccess = true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
result.IsSuccess = false;
|
||||
result.AddError(GalleryErrors.ProcessingPackageError, ex);
|
||||
}
|
||||
//
|
||||
return result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public StringResultObject InstallGalleryApplication(string webAppId, List<DeploymentParameter> updatedValues)
|
||||
{
|
||||
StringResultObject result = new StringResultObject();
|
||||
|
||||
try
|
||||
{
|
||||
WebApplicationGallery module = new WebApplicationGallery(GalleryXmlFeedUrl);
|
||||
//
|
||||
string applicationPath = module.InstallApplication(webAppId, updatedValues);
|
||||
//
|
||||
if (!String.IsNullOrEmpty(applicationPath))
|
||||
{
|
||||
result.Value = applicationPath;
|
||||
result.IsSuccess = true;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
result.IsSuccess = false;
|
||||
result.AddError(GalleryErrors.PackageInstallationError, ex);
|
||||
}
|
||||
//
|
||||
return result;
|
||||
}
|
||||
public GalleryApplicationResult GetGalleryApplication(int UserId, string id)
|
||||
{
|
||||
GalleryApplicationResult result = new GalleryApplicationResult();
|
||||
//
|
||||
try
|
||||
{
|
||||
WPIApplicationGallery module = new WPIApplicationGallery(WPI_INSTANCE_VIEWER);
|
||||
//
|
||||
result.Value = module.GetApplicationByProductId(UserId, id);
|
||||
result.IsSuccess = true;
|
||||
result.ErrorCodes.AddRange(module.GetMissingDependenciesForApplicationById(UserId, id));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
result.IsSuccess = false;
|
||||
result.AddError(GalleryErrors.ProcessingFeedXMLError, ex);
|
||||
}
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
public GalleryWebAppStatus DownloadGalleryApplication(int UserId, string id)
|
||||
{
|
||||
return GetGalleryApplicationStatus(UserId, id);
|
||||
}
|
||||
|
||||
public GalleryWebAppStatus GetGalleryApplicationStatus(int UserId, string id)
|
||||
{
|
||||
try
|
||||
{
|
||||
WPIApplicationGallery module = new WPIApplicationGallery(WPI_INSTANCE_INSTALLER);
|
||||
|
||||
return module.DownloadAppAndGetStatus(UserId, id);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteError(ex);
|
||||
return GalleryWebAppStatus.Failed;
|
||||
}
|
||||
}
|
||||
|
||||
public DeploymentParametersResult GetGalleryApplicationParameters(int UserId, string id)
|
||||
{
|
||||
DeploymentParametersResult result = new DeploymentParametersResult();
|
||||
|
||||
try
|
||||
{
|
||||
WPIApplicationGallery module = new WPIApplicationGallery(WPI_INSTANCE_INSTALLER);
|
||||
//
|
||||
result.Value = module.GetApplicationParameters(UserId, id);
|
||||
result.IsSuccess = true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
result.IsSuccess = false;
|
||||
result.AddError(GalleryErrors.ProcessingPackageError, ex);
|
||||
}
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
public StringResultObject InstallGalleryApplication(int UserId, string webAppId, List<DeploymentParameter> updatedValues, string languageId)
|
||||
{
|
||||
StringResultObject result = new StringResultObject();
|
||||
|
||||
try
|
||||
{
|
||||
WPIApplicationGallery module = new WPIApplicationGallery(WPI_INSTANCE_INSTALLER);
|
||||
//
|
||||
module.InstallApplication(UserId, webAppId, updatedValues, languageId, ref result);
|
||||
|
||||
if (result.IsSuccess)
|
||||
{
|
||||
module.DeleteWpiHelper(UserId);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
result.IsSuccess = false;
|
||||
result.AddError(GalleryErrors.PackageInstallationError, ex);
|
||||
}
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
|
|
@ -0,0 +1,438 @@
|
|||
// 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.
|
||||
//
|
||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// - Neither the name of the Outercurve Foundation nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Security;
|
||||
using System.Text;
|
||||
using Microsoft.Practices.EnterpriseLibrary.Caching;
|
||||
using Microsoft.Web.Deployment;
|
||||
using Microsoft.Web.PlatformInstaller;
|
||||
using WebsitePanel.Providers.ResultObjects;
|
||||
using WebsitePanel.Providers.Utils;
|
||||
using WebsitePanel.Providers.WebAppGallery;
|
||||
using WebsitePanel.Server.Code;
|
||||
using WebsitePanel.Server.Utils;
|
||||
using System.Web;
|
||||
using System.Diagnostics;
|
||||
using Microsoft.Practices.EnterpriseLibrary.Caching.Expirations;
|
||||
|
||||
namespace WebsitePanel.Providers.Web.WPIWebApplicationGallery
|
||||
{
|
||||
internal class WPIApplicationGallery
|
||||
{
|
||||
|
||||
private CacheManager _cache;
|
||||
private const int LIVE_IN_CACHE_MINUTES = 20;
|
||||
private string _sufix="";
|
||||
|
||||
public WPIApplicationGallery(string 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();
|
||||
//_wpi = GetWpiHelper();
|
||||
}
|
||||
|
||||
|
||||
|
||||
private string GetKey_Feeds(int UserId)
|
||||
{
|
||||
return "WPIHELPER_CACHE_FEEDS" + UserId.ToString();
|
||||
}
|
||||
|
||||
private string GetKey_object(int UserId)
|
||||
{
|
||||
return "WPIHELPER_CACHE_OBJECTS" + UserId.ToString() + _sufix;
|
||||
}
|
||||
|
||||
public void InitFeeds(int UserId, string[] feeds)
|
||||
{
|
||||
//Log.WriteInfo("InitFeeds {0} ", UserId);
|
||||
|
||||
string CACHE_KEY = GetKey_Feeds(UserId);
|
||||
|
||||
if (_cache.Contains(CACHE_KEY))
|
||||
{
|
||||
string[] oldfeeds = (string[])_cache[CACHE_KEY];
|
||||
|
||||
if (!ArraysEqual<string>(feeds, oldfeeds))
|
||||
{
|
||||
//Feeeds have been changed
|
||||
ICacheItemExpiration exp = new SlidingTime(TimeSpan.FromMinutes(LIVE_IN_CACHE_MINUTES*2));
|
||||
_cache.Add(CACHE_KEY, feeds, CacheItemPriority.Normal, null, exp );
|
||||
|
||||
DeleteWpiHelper(UserId);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
//add to cache
|
||||
ICacheItemExpiration exp = new SlidingTime(TimeSpan.FromMinutes(LIVE_IN_CACHE_MINUTES*2));
|
||||
_cache.Add(CACHE_KEY, feeds, CacheItemPriority.Normal, null, exp);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private WpiHelper GetWpiHelper(int UserId)
|
||||
{
|
||||
string CACHE_KEY = GetKey_object(UserId);
|
||||
|
||||
if (_cache.Contains(CACHE_KEY))
|
||||
{
|
||||
WpiHelper result = (WpiHelper)_cache[CACHE_KEY];
|
||||
|
||||
if (result != null)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
string[] feeds = (string[])_cache[GetKey_Feeds(UserId)];
|
||||
if (null == feeds)
|
||||
{
|
||||
throw new Exception("BUG:No feeds in cache.");
|
||||
}
|
||||
|
||||
WpiHelper wpi = new WpiHelper(feeds);
|
||||
ICacheItemExpiration exp = new SlidingTime(TimeSpan.FromMinutes(LIVE_IN_CACHE_MINUTES));
|
||||
|
||||
_cache.Add(CACHE_KEY, wpi, CacheItemPriority.Normal, null, exp);
|
||||
//Debug.WriteLine(string.Format("GetWpiHelper: put in cache. User {0}", UserId));
|
||||
|
||||
return wpi;
|
||||
}
|
||||
|
||||
public void DeleteWpiHelper(int UserId)
|
||||
{
|
||||
_cache.Remove(GetKey_object(UserId));
|
||||
}
|
||||
|
||||
|
||||
#region Public methods
|
||||
|
||||
public void SetResourceLanguage(int UserId, string resourceLanguage)
|
||||
{
|
||||
WpiHelper wpi = GetWpiHelper(UserId);
|
||||
wpi.SetResourceLanguage(resourceLanguage);
|
||||
}
|
||||
|
||||
|
||||
public List<SettingPair> GetLanguages(int UserId)
|
||||
{
|
||||
List<SettingPair> langs = new List<SettingPair>();
|
||||
WpiHelper wpi = GetWpiHelper(UserId);
|
||||
foreach (Language lang in wpi.GetLanguages())
|
||||
{
|
||||
langs.Add(new SettingPair(lang.Id, lang.Name));
|
||||
}
|
||||
|
||||
return langs;
|
||||
}
|
||||
|
||||
public List<GalleryCategory> GetCategories(int UserId)
|
||||
{
|
||||
WpiHelper wpi = GetWpiHelper(UserId);
|
||||
|
||||
List<GalleryCategory> categories = new List<GalleryCategory>();
|
||||
|
||||
foreach (Keyword keyword in wpi.GetKeywords())
|
||||
{
|
||||
|
||||
if (wpi.IsKeywordApplication(keyword))
|
||||
{
|
||||
categories.Add(new GalleryCategory
|
||||
{
|
||||
Id = keyword.Id,
|
||||
Name = keyword.Text
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return categories;
|
||||
}
|
||||
|
||||
public List<GalleryApplication> GetApplications(int UserId, string categoryId)
|
||||
{
|
||||
WpiHelper wpi = GetWpiHelper(UserId);
|
||||
|
||||
List<Product> products = wpi.GetApplications(categoryId);
|
||||
List<GalleryApplication> applications = new List<GalleryApplication>();
|
||||
|
||||
foreach (Product product in products)
|
||||
{
|
||||
applications.Add(MakeGalleryApplicationFromProduct(product));
|
||||
}
|
||||
|
||||
return applications;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public List<GalleryApplication> GetGalleryApplicationsFiltered(int UserId, string pattern)
|
||||
{
|
||||
WpiHelper wpi = GetWpiHelper(UserId);
|
||||
|
||||
List<Product> products = wpi.GetApplications(null);
|
||||
List<GalleryApplication> applications = new List<GalleryApplication>();
|
||||
|
||||
foreach (Product product in products)
|
||||
{
|
||||
if (product.Title.ToLower().Contains(pattern.ToLower()))
|
||||
{
|
||||
applications.Add(MakeGalleryApplicationFromProduct(product));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return applications;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public GalleryApplication GetApplicationByProductId(int UserId, string id)
|
||||
{
|
||||
WpiHelper wpi = GetWpiHelper(UserId);
|
||||
|
||||
return MakeGalleryApplicationFromProduct(wpi.GetProduct(id));
|
||||
}
|
||||
|
||||
public List<string> GetMissingDependenciesForApplicationById(int UserId, string id)
|
||||
{
|
||||
WpiHelper wpi = GetWpiHelper(UserId);
|
||||
|
||||
List<string> missingDeps = new List<string>();
|
||||
foreach (Product product in wpi.GetProductsWithDependencies(new string[] { id }))
|
||||
{
|
||||
if (product.ProductId != id)
|
||||
{
|
||||
missingDeps.Add(product.Title);
|
||||
}
|
||||
}
|
||||
|
||||
return missingDeps;
|
||||
}
|
||||
|
||||
public GalleryWebAppStatus DownloadAppAndGetStatus(int UserId, string id)
|
||||
{
|
||||
WpiHelper wpi = GetWpiHelper(UserId);
|
||||
wpi.InstallProducts(new[] { id }, null, null, null);
|
||||
|
||||
return GalleryWebAppStatus.Downloaded;
|
||||
}
|
||||
|
||||
public List<DeploymentParameter> GetApplicationParameters(int UserId, string id)
|
||||
{
|
||||
WpiHelper wpi = GetWpiHelper(UserId);
|
||||
|
||||
Product product = wpi.GetProduct(id);
|
||||
List<DeploymentParameter> deploymentParameters = new List<DeploymentParameter>();
|
||||
IList<DeclaredParameter> appDecalredParameters = wpi.GetAppDecalredParameters(id);
|
||||
foreach (DeclaredParameter declaredParameter in appDecalredParameters)
|
||||
{
|
||||
deploymentParameters.Add(MakeDeploymentParameterFromDecalredParameter(declaredParameter));
|
||||
}
|
||||
|
||||
return deploymentParameters;
|
||||
|
||||
}
|
||||
|
||||
public void InstallApplication(
|
||||
int UserId,
|
||||
string webAppId,
|
||||
List<DeploymentParameter> updatedParameters,
|
||||
string languageId,
|
||||
ref StringResultObject result)
|
||||
{
|
||||
WpiHelper wpi = GetWpiHelper(UserId);
|
||||
|
||||
// convert list of DeploymentParameter to list of WpiUpdatedDeploymentParameter
|
||||
List<WpiUpdatedDeploymentParameter> updatedWpiParameters = new List<WpiUpdatedDeploymentParameter>();
|
||||
foreach (DeploymentParameter updatedParameter in updatedParameters)
|
||||
{
|
||||
updatedWpiParameters.Add(
|
||||
new WpiUpdatedDeploymentParameter
|
||||
{
|
||||
Name = updatedParameter.Name,
|
||||
Value = updatedParameter.Value,
|
||||
WellKnownTags = (DeploymentWellKnownTag)updatedParameter.WellKnownTags
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
Log.WriteStart("Application installation starting");
|
||||
string log;
|
||||
string failedMessage;
|
||||
bool success = wpi.InstallApplication(
|
||||
webAppId,
|
||||
updatedWpiParameters,
|
||||
languageId,
|
||||
InstallStatusUpdatedHandler, InstallCompleteHandler,
|
||||
out log,
|
||||
out failedMessage);
|
||||
|
||||
result.Value = log;
|
||||
result.IsSuccess = success;
|
||||
|
||||
// add log files to result value
|
||||
try
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
string[] filePaths = Directory.GetFiles(wpi.GetLogFileDirectory());
|
||||
foreach (string filePath in filePaths)
|
||||
{
|
||||
using (StreamReader streamReader = new StreamReader(filePath))
|
||||
{
|
||||
string fileContent =
|
||||
SecurityElement.Escape(StringUtils.CleanupASCIIControlCharacters(streamReader.ReadToEnd()));
|
||||
sb.AppendLine().AppendLine(filePath).AppendLine(fileContent);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
result.Value += sb.ToString();
|
||||
}
|
||||
catch(Exception)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
if (!success)
|
||||
{
|
||||
result.AddError(failedMessage, null);
|
||||
}
|
||||
|
||||
// don`t reuse wpi helper after installation
|
||||
DeleteWpiHelper(UserId);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region installaton events
|
||||
|
||||
private void InstallStatusUpdatedHandler(object sender, InstallStatusEventArgs installStatusEventArgs)
|
||||
{
|
||||
Log.WriteInfo("Application {0} installation status: {1}, return code: {0}",
|
||||
installStatusEventArgs.InstallerContext.ProductName,
|
||||
installStatusEventArgs.InstallerContext.InstallationState,
|
||||
installStatusEventArgs.InstallerContext.ReturnCode);
|
||||
}
|
||||
|
||||
private void InstallCompleteHandler(object sender, EventArgs eventArgs)
|
||||
{
|
||||
Log.WriteEnd("Application installation completed");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region static helpers
|
||||
|
||||
protected static GalleryApplication MakeGalleryApplicationFromProduct(Product product)
|
||||
{
|
||||
if (null == product)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
int size = 0;
|
||||
if (null != product.Installers && product.Installers.Count > 0 && null != product.Installers[0].InstallerFile)
|
||||
{
|
||||
size = product.Installers[0].InstallerFile.FileSize;
|
||||
}
|
||||
|
||||
return new GalleryApplication
|
||||
{
|
||||
Id = product.ProductId,
|
||||
Title = product.Title,
|
||||
Author = new Author {Name = product.Author, Uri = product.AuthorUri.ToString()},
|
||||
IconUrl = product.IconUrl.ToString(),
|
||||
Version = product.Version,
|
||||
Description = product.LongDescription,
|
||||
Summary = product.Summary,
|
||||
LastUpdated = product.Published,
|
||||
Published = product.Published,
|
||||
Link = product.Link.ToString(),
|
||||
InstallerFileSize = size
|
||||
};
|
||||
}
|
||||
|
||||
protected static DeploymentParameter MakeDeploymentParameterFromDecalredParameter(DeclaredParameter d)
|
||||
{
|
||||
DeploymentParameter r = new DeploymentParameter();
|
||||
r.Name = d.Name;
|
||||
r.FriendlyName = d.FriendlyName;
|
||||
r.DefaultValue = d.DefaultValue;
|
||||
r.Description = d.Description;
|
||||
r.WellKnownTags = (DeploymentParameterWellKnownTag) d.Tags;
|
||||
if (null != d.Validation)
|
||||
{
|
||||
r.ValidationKind = (DeploymentParameterValidationKind) d.Validation.Kind;
|
||||
r.ValidationString = d.Validation.ValidationString;
|
||||
}
|
||||
else
|
||||
{
|
||||
r.ValidationKind = DeploymentParameterValidationKind.None;
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
protected static bool ArraysEqual<T>(T[] a1, T[] a2)
|
||||
{
|
||||
if (ReferenceEquals(a1, a2))
|
||||
return true;
|
||||
|
||||
if (a1 == null || a2 == null)
|
||||
return false;
|
||||
|
||||
if (a1.Length != a2.Length)
|
||||
return false;
|
||||
|
||||
EqualityComparer<T> comparer = EqualityComparer<T>.Default;
|
||||
for (int i = 0; i < a1.Length; i++)
|
||||
{
|
||||
if (!comparer.Equals(a1[i], a2[i])) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -51,7 +51,8 @@ using System.Linq;
|
|||
|
||||
namespace WebsitePanel.Providers.Web
|
||||
{
|
||||
public sealed class WebApplicationGallery
|
||||
[Obsolete]
|
||||
public sealed class WebApplicationGallery
|
||||
{
|
||||
// MS Deploy library
|
||||
private const string MS_DEPLOY_ASSEMBLY_NAME = "Microsoft.Web.Deployment";
|
||||
|
|
|
@ -67,10 +67,14 @@
|
|||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\Lib\Microsoft.Practices.ObjectBuilder.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Web.Deployment, Version=7.1.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>
|
||||
<HintPath>..\..\Lib\References\Microsoft\Microsoft.Web.Deployment.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Web.PlatformInstaller, Version=3.0.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\Lib\Microsoft.Web.PlatformInstaller.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.DirectoryServices" />
|
||||
|
@ -82,9 +86,13 @@
|
|||
<Compile Include="..\VersionInfo.cs">
|
||||
<Link>VersionInfo.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\WebsitePanel.Server\Code\WPIHelper.cs">
|
||||
<Link>WPIWebApplicationGallery\WPIHelper.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="IIs60.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="WebApplicationGallery.cs" />
|
||||
<Compile Include="WPIWebApplicationGallery\WPIApplicationGallery.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\WebsitePanel.Providers.Base\WebsitePanel.Providers.Base.csproj">
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -28,6 +28,7 @@
|
|||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
|
@ -51,5 +52,18 @@ namespace WebsitePanel.Providers.Utils
|
|||
|
||||
return Regex.Replace(str, "\\W+", "_", RegexOptions.Compiled);
|
||||
}
|
||||
|
||||
public static string CleanupASCIIControlCharacters(string s)
|
||||
{
|
||||
byte[] invalidCharacters = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0xB,
|
||||
0xC, 0xE, 0xF, 0x10, 0x11, 0x12, 0x14, 0x15, 0x16,
|
||||
0x17, 0x18, 0x1A, 0x1B, 0x1E, 0x1F, 0x7F };
|
||||
|
||||
byte[] sanitizedBytes = (from a in Encoding.UTF8.GetBytes(s)
|
||||
where !invalidCharacters.Contains(a)
|
||||
select a).ToArray();
|
||||
|
||||
return Encoding.UTF8.GetString(sanitizedBytes);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,65 @@
|
|||
// 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.
|
||||
//
|
||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// - Neither the name of the Outercurve Foundation nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("WebsitePanel.Server.WPIService")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("WebsitePanel.Server.WPIService")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2012")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("aed34aef-8940-48e0-9183-f2522efd7d28")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
|
@ -0,0 +1,68 @@
|
|||
// 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.
|
||||
//
|
||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// - Neither the name of the Outercurve Foundation nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.Remoting;
|
||||
using System.Runtime.Remoting.Channels;
|
||||
using System.Runtime.Remoting.Channels.Tcp;
|
||||
using System.Threading;
|
||||
|
||||
namespace WebsitePanel.Server.WPIService
|
||||
{
|
||||
class Server
|
||||
{
|
||||
static Mutex mutex = null;
|
||||
static void Main(string[] args)
|
||||
{
|
||||
bool onlyInstance = false;
|
||||
mutex = new Mutex(false, "Global\\{5DE133EC-49AE-4AE4-99BE-0F0A0BB5719E}", out onlyInstance);
|
||||
if (!mutex.WaitOne(0, false)) //if (!onlyInstance)
|
||||
{
|
||||
Console.WriteLine("The service is already running.");
|
||||
return;
|
||||
}
|
||||
TcpChannel ch = new TcpChannel(WPIServiceContract.PORT);
|
||||
ChannelServices.RegisterChannel(ch, true);
|
||||
|
||||
WPIService wpiService = new WPIService();
|
||||
RemotingServices.Marshal(wpiService, "WPIServiceContract");
|
||||
|
||||
|
||||
Console.WriteLine("The service is running.");
|
||||
|
||||
while (!wpiService.IsFinished)
|
||||
{
|
||||
Thread.Sleep(2000);
|
||||
}
|
||||
|
||||
Console.WriteLine("The service is finished.");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,247 @@
|
|||
// 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.
|
||||
//
|
||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// - Neither the name of the Outercurve Foundation nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using Microsoft.Web.PlatformInstaller;
|
||||
using WebsitePanel.Server.Code;
|
||||
|
||||
namespace WebsitePanel.Server.WPIService
|
||||
{
|
||||
// Define a service contract.
|
||||
//[ServiceContract(Namespace = "http://Helicon.Zoo.WPIService")]
|
||||
//public interface IWPIService
|
||||
//{
|
||||
// // [OperationContract]
|
||||
// void Initialize(string[] feeds);
|
||||
|
||||
// //[OperationContract]
|
||||
// void BeginInstallation(string[] productsToInstall);
|
||||
|
||||
// //[OperationContract]
|
||||
// string GetStatus();
|
||||
|
||||
// string GetLogs();
|
||||
//}
|
||||
|
||||
enum EWPIServiceStatus
|
||||
{
|
||||
Initialised,
|
||||
Installation,
|
||||
InstallationComplete,
|
||||
InstallationError
|
||||
}
|
||||
|
||||
// Service class which implements the service contract.
|
||||
//[ServiceBehavior(InstanceContextMode = InstanceContextMode.Single)]
|
||||
class WPIService : WPIServiceContract
|
||||
{
|
||||
private WpiHelper _wpiHelper;
|
||||
private string[] _productsToInstall;
|
||||
|
||||
private EWPIServiceStatus _installationStatus;
|
||||
private string _statusMessage = "preparing...";
|
||||
|
||||
private Thread _installerThread;
|
||||
private object _lock = new object();
|
||||
|
||||
public bool IsFinished { get; private set; }
|
||||
|
||||
#region IWPIService contract
|
||||
|
||||
public override string Ping()
|
||||
{
|
||||
return "OK";
|
||||
}
|
||||
|
||||
public override void Initialize(string[] feeds)
|
||||
{
|
||||
lock (_lock)
|
||||
{
|
||||
if (_installationStatus == EWPIServiceStatus.Installation)
|
||||
{
|
||||
throw new Exception("Invalid state, already in Installation process");
|
||||
}
|
||||
|
||||
_installationStatus = EWPIServiceStatus.Initialised;
|
||||
|
||||
if (_wpiHelper == null)
|
||||
{
|
||||
_wpiHelper = new WpiHelper(feeds);
|
||||
Console.WriteLine("_wpiHelper initialized");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void BeginInstallation(string[] productsToInstall)
|
||||
{
|
||||
lock (_lock)
|
||||
{
|
||||
|
||||
if (_installationStatus != EWPIServiceStatus.Initialised)
|
||||
{
|
||||
throw new Exception("Invalid state, expected EWPIServiceStatus.Initialised. now: " + _installationStatus);
|
||||
}
|
||||
|
||||
_installationStatus = EWPIServiceStatus.Installation;
|
||||
_statusMessage = "Preparing for install";
|
||||
|
||||
_productsToInstall = new string[productsToInstall.Length];
|
||||
productsToInstall.CopyTo(_productsToInstall,0);
|
||||
|
||||
_installerThread = new Thread(new ThreadStart(InternalBeginInstallation));
|
||||
_installerThread.Start();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public override string GetStatus()
|
||||
{
|
||||
|
||||
lock(_lock)
|
||||
{
|
||||
|
||||
string result = this._statusMessage;
|
||||
|
||||
//Allow exit from app, if finished
|
||||
IsInstallationProceed();
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
public override string GetLogFileDirectory()
|
||||
{
|
||||
|
||||
lock (_lock)
|
||||
{
|
||||
return null != _wpiHelper ? _wpiHelper.GetLogFileDirectory() : null;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region private implementaion
|
||||
private bool IsInstallationProceed()
|
||||
{
|
||||
if (_installationStatus == EWPIServiceStatus.InstallationComplete)
|
||||
{
|
||||
IsFinished = true;
|
||||
return false;
|
||||
}
|
||||
else if (_installationStatus == EWPIServiceStatus.InstallationError)
|
||||
{
|
||||
IsFinished = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
private void InternalBeginInstallation()
|
||||
{
|
||||
_wpiHelper.InstallProducts(
|
||||
_productsToInstall,
|
||||
WpiHelper.DeafultLanguage,
|
||||
InstallStatusUpdatedHandler,
|
||||
InstallCompleteHandler
|
||||
);
|
||||
|
||||
lock (_lock)
|
||||
{
|
||||
_installationStatus = EWPIServiceStatus.InstallationComplete;
|
||||
}
|
||||
}
|
||||
|
||||
private void InstallCompleteHandler(object sender, EventArgs eventArgs)
|
||||
{
|
||||
lock(_lock)
|
||||
{
|
||||
_installationStatus = EWPIServiceStatus.InstallationComplete;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void InstallStatusUpdatedHandler(object sender, InstallStatusEventArgs e)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.AppendFormat("{0}: ", e.InstallerContext.ProductName);
|
||||
|
||||
switch (e.InstallerContext.InstallationState)
|
||||
{
|
||||
case InstallationState.Waiting:
|
||||
sb.Append("please wait...").AppendLine();
|
||||
break;
|
||||
case InstallationState.Downloading:
|
||||
sb.Append("downloading").AppendLine();
|
||||
if (e.ProgressValue > 0)
|
||||
{
|
||||
sb.AppendFormat("{0} of {1} Kb downloaded", e.ProgressValue,
|
||||
e.InstallerContext.Installer.InstallerFile.FileSize);
|
||||
sb.AppendLine();
|
||||
}
|
||||
break;
|
||||
case InstallationState.Downloaded:
|
||||
sb.Append("downloaded").AppendLine();
|
||||
break;
|
||||
case InstallationState.DownloadFailed:
|
||||
sb.AppendFormat("download failed").AppendLine();
|
||||
sb.AppendLine(e.InstallerContext.InstallStateDetails);
|
||||
break;
|
||||
case InstallationState.DependencyFailed:
|
||||
sb.AppendFormat("dependency failed").AppendLine();
|
||||
sb.AppendLine(e.InstallerContext.InstallStateDetails);
|
||||
sb.AppendFormat("{0}: {1}", e.InstallerContext.ReturnCode.Status, e.InstallerContext.ReturnCode.DetailedInformation).AppendLine();
|
||||
break;
|
||||
case InstallationState.Installing:
|
||||
sb.Append("installing").AppendLine();
|
||||
break;
|
||||
case InstallationState.InstallCompleted:
|
||||
sb.Append("install completed").AppendLine();
|
||||
break;
|
||||
case InstallationState.Canceled:
|
||||
sb.AppendFormat("canceled").AppendLine();
|
||||
sb.AppendLine(e.InstallerContext.InstallStateDetails);
|
||||
sb.AppendFormat("{0}: {1}", e.InstallerContext.ReturnCode.Status, e.InstallerContext.ReturnCode.DetailedInformation).AppendLine();
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
|
||||
lock (_lock)
|
||||
{
|
||||
_statusMessage = sb.ToString();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -0,0 +1,76 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{DD9E57D5-797F-4420-AF1A-23CEA2F310E0}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>WebsitePanel.Server.WPIService</RootNamespace>
|
||||
<AssemblyName>WebsitePanel.Server.WPIService</AssemblyName>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile>
|
||||
</TargetFrameworkProfile>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\WebsitePanel.Server\bin\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\WebsitePanel.Server\bin\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.Web.Deployment, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\Lib\References\Microsoft\Microsoft.Web.Deployment.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Web.PlatformInstaller, Version=3.0.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\Lib\Microsoft.Web.PlatformInstaller.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Runtime.Remoting" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\WebsitePanel.Server\Code\WPIHelper.cs">
|
||||
<Link>WPIHelper.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="Server.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="WPIService.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\WebsitePanel.Server.WPIServiceContract\WebsitePanel.Server.WPIServiceContract.csproj">
|
||||
<Project>{736FA0F0-ECA3-416E-B299-85CC425FFF44}</Project>
|
||||
<Name>WebsitePanel.Server.WPIServiceContract</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
|
@ -0,0 +1,65 @@
|
|||
// 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.
|
||||
//
|
||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// - Neither the name of the Outercurve Foundation nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("WpiServiceContract")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("WpiServiceContract")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2012")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("9af06617-244e-4494-a960-08c2e1654f0b")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
|
@ -0,0 +1,46 @@
|
|||
// 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.
|
||||
//
|
||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// - Neither the name of the Outercurve Foundation nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
|
||||
namespace WebsitePanel.Server.WPIService
|
||||
{
|
||||
public class WPIServiceContract : MarshalByRefObject
|
||||
{
|
||||
public const int PORT = 7591; //random
|
||||
|
||||
virtual public string Ping() { return "NotImplemented"; }
|
||||
virtual public void Initialize(string[] feeds){}
|
||||
virtual public void BeginInstallation(string[] productsToInstall) { }
|
||||
virtual public string GetStatus() { return "NotImplemented"; }
|
||||
virtual public string GetLogFileDirectory() { return "NotImplemented"; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{736FA0F0-ECA3-416E-B299-85CC425FFF44}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>WpiServiceContract</RootNamespace>
|
||||
<AssemblyName>WpiServiceContract</AssemblyName>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="WPIServiceContract.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
|
@ -99,6 +99,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Providers.Virt
|
|||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Providers.Mail.SmarterMail9", "WebsitePanel.Providers.Mail.SmarterMail9\WebsitePanel.Providers.Mail.SmarterMail9.csproj", "{FB97E984-2463-44EB-B8BE-14AA41D0365E}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Server.WPIService", "WebsitePanel.Server.WPIService\WebsitePanel.Server.WPIService.csproj", "{DD9E57D5-797F-4420-AF1A-23CEA2F310E0}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Server.WPIServiceContract", "WebsitePanel.Server.WPIServiceContract\WebsitePanel.Server.WPIServiceContract.csproj", "{736FA0F0-ECA3-416E-B299-85CC425FFF44}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
@ -277,6 +281,14 @@ Global
|
|||
{FB97E984-2463-44EB-B8BE-14AA41D0365E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{FB97E984-2463-44EB-B8BE-14AA41D0365E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{FB97E984-2463-44EB-B8BE-14AA41D0365E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{DD9E57D5-797F-4420-AF1A-23CEA2F310E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{DD9E57D5-797F-4420-AF1A-23CEA2F310E0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{DD9E57D5-797F-4420-AF1A-23CEA2F310E0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{DD9E57D5-797F-4420-AF1A-23CEA2F310E0}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{736FA0F0-ECA3-416E-B299-85CC425FFF44}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{736FA0F0-ECA3-416E-B299-85CC425FFF44}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{736FA0F0-ECA3-416E-B299-85CC425FFF44}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{736FA0F0-ECA3-416E-B299-85CC425FFF44}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
|
@ -38,6 +38,7 @@ using Microsoft.Web.Services3;
|
|||
using Microsoft.Web.Services3.Design;
|
||||
using Microsoft.Web.Services3.Security;
|
||||
using Microsoft.Web.Services3.Security.Tokens;
|
||||
using WebSecurity=Microsoft.Web.Services3.Security.Security;
|
||||
|
||||
namespace WebsitePanel.Server
|
||||
{
|
||||
|
@ -105,7 +106,7 @@ namespace WebsitePanel.Server
|
|||
this.filterContext = filterContext;
|
||||
}
|
||||
|
||||
public override void ValidateMessageSecurity(SoapEnvelope envelope, Security security)
|
||||
public override void ValidateMessageSecurity(SoapEnvelope envelope, WebSecurity security)
|
||||
{
|
||||
if (!ServerConfiguration.Security.SecurityEnabled)
|
||||
return;
|
||||
|
@ -145,7 +146,7 @@ namespace WebsitePanel.Server
|
|||
throw new SecurityFault("Message did not meet security requirements.");
|
||||
}
|
||||
|
||||
private bool CheckSignature(SoapEnvelope envelope, Security security, MessageSignature signature)
|
||||
private bool CheckSignature(SoapEnvelope envelope, WebSecurity security, MessageSignature signature)
|
||||
{
|
||||
//
|
||||
// Now verify which parts of the message were actually signed.
|
||||
|
|
807
WebsitePanel/Sources/WebsitePanel.Server/Code/WPIHelper.cs
Normal file
807
WebsitePanel/Sources/WebsitePanel.Server/Code/WPIHelper.cs
Normal file
|
@ -0,0 +1,807 @@
|
|||
// 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.
|
||||
//
|
||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// - Neither the name of the Outercurve Foundation nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using Microsoft.Web.Deployment;
|
||||
using Microsoft.Web.PlatformInstaller;
|
||||
using Installer = Microsoft.Web.PlatformInstaller.Installer;
|
||||
|
||||
namespace WebsitePanel.Server.Code
|
||||
{
|
||||
public class WpiUpdatedDeploymentParameter
|
||||
{
|
||||
public string Name;
|
||||
public string Value;
|
||||
public DeploymentWellKnownTag WellKnownTags;
|
||||
}
|
||||
|
||||
public class WpiHelper
|
||||
{
|
||||
#region public consts
|
||||
|
||||
public const string DeafultLanguage = "en";
|
||||
|
||||
#endregion
|
||||
|
||||
#region private fields
|
||||
|
||||
private readonly List<string> _feeds;
|
||||
private string _webPIinstallersFolder;
|
||||
private const string MainWpiFeed = "https://www.microsoft.com/web/webpi/3.0/webproductlist.xml";
|
||||
private const string IisChoiceProduct = "StaticContent";
|
||||
private const string WebMatrixChoiceProduct = "WebMatrix";
|
||||
private ProductManager _productManager;
|
||||
private bool _installCompleted;
|
||||
private InstallManager _installManager;
|
||||
private string _LogFileDirectory = string.Empty;
|
||||
string _resourceLanguage = DeafultLanguage;
|
||||
private const DeploymentWellKnownTag databaseEngineTags =
|
||||
DeploymentWellKnownTag.Sql |
|
||||
DeploymentWellKnownTag.MySql |
|
||||
DeploymentWellKnownTag.SqLite |
|
||||
DeploymentWellKnownTag.VistaDB |
|
||||
DeploymentWellKnownTag.FlatFile;
|
||||
|
||||
#endregion private fields
|
||||
|
||||
public WpiHelper(IEnumerable<string> feeds)
|
||||
{
|
||||
_feeds = new List<string>();
|
||||
_feeds.AddRange(feeds);
|
||||
|
||||
Initialize();
|
||||
}
|
||||
|
||||
private void Initialize()
|
||||
{
|
||||
// insert Main WebPI xml file
|
||||
if (!_feeds.Contains(MainWpiFeed, StringComparer.OrdinalIgnoreCase))
|
||||
{
|
||||
_feeds.Insert(0, MainWpiFeed);
|
||||
}
|
||||
|
||||
// create cache folder if not exists
|
||||
//_webPIinstallersFolder = Environment.ExpandEnvironmentVariables(@"%LocalAppData%\Microsoft\Web Platform Installer\installers");
|
||||
_webPIinstallersFolder = Path.Combine(
|
||||
Environment.ExpandEnvironmentVariables("%SystemRoot%"),
|
||||
"Temp\\zoo.wpi\\AppData\\Local\\Microsoft\\Web Platform Installer\\installers" );
|
||||
|
||||
if (!Directory.Exists(_webPIinstallersFolder))
|
||||
{
|
||||
Directory.CreateDirectory(_webPIinstallersFolder);
|
||||
}
|
||||
|
||||
// load feeds
|
||||
_productManager = new ProductManager();
|
||||
|
||||
|
||||
foreach (string feed in _feeds)
|
||||
{
|
||||
Log(string.Format("Loading {0}", feed));
|
||||
if (feed.StartsWith("https://www.microsoft.com", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
_productManager.Load(new Uri(feed), true, true, true, _webPIinstallersFolder);
|
||||
}
|
||||
else
|
||||
{
|
||||
_productManager.LoadExternalFile(new Uri(feed));
|
||||
}
|
||||
}
|
||||
|
||||
Log(string.Format("{0} products loaded", _productManager.Products.Count));
|
||||
|
||||
LogDebugInfo();
|
||||
}
|
||||
|
||||
public void SetResourceLanguage(string resourceLanguage)
|
||||
{
|
||||
_resourceLanguage = resourceLanguage;
|
||||
_productManager.SetResourceLanguage(resourceLanguage);
|
||||
}
|
||||
|
||||
#region Public interface
|
||||
|
||||
public List<Product> GetProducts()
|
||||
{
|
||||
return GetProducts(null,null);
|
||||
}
|
||||
|
||||
public List<Language> GetLanguages()
|
||||
{
|
||||
List<Language> languages = new List<Language>();
|
||||
|
||||
foreach (Product product in GetProducts())
|
||||
{
|
||||
if (null!=product.Installers)
|
||||
{
|
||||
foreach (Installer installer in product.Installers)
|
||||
{
|
||||
Language lang = installer.Language;
|
||||
if (null!=lang && !languages.Contains(lang))
|
||||
{
|
||||
languages.Add(lang);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return languages;
|
||||
}
|
||||
|
||||
public void CancelInstallProducts()
|
||||
{
|
||||
if (_installManager!= null)
|
||||
{
|
||||
_installManager.Cancel();
|
||||
}
|
||||
}
|
||||
|
||||
private List<Installer> GetInstallers(List<Product> productsToInstall, Language lang)
|
||||
{
|
||||
List<Installer> installersToUse = new List<Installer>();
|
||||
foreach (Product product in productsToInstall)
|
||||
{
|
||||
Installer installer = product.GetInstaller(lang);
|
||||
if (null != installer)
|
||||
{
|
||||
installersToUse.Add(installer);
|
||||
}
|
||||
}
|
||||
|
||||
return installersToUse;
|
||||
}
|
||||
|
||||
|
||||
public List<Product> GetProductsWithDependencies(IEnumerable<string> productIdsToInstall )
|
||||
{
|
||||
List<string> updatedProductIdsToInstall = new List<string>();
|
||||
// add iis chioce product to force iis (not-iisexpress/webmatrix) branch
|
||||
updatedProductIdsToInstall.Add(IisChoiceProduct);
|
||||
updatedProductIdsToInstall.AddRange(productIdsToInstall);
|
||||
|
||||
List<Product> productsToInstall = new List<Product>();
|
||||
|
||||
foreach (string productId in updatedProductIdsToInstall)
|
||||
{
|
||||
Log(string.Format("Product {0} to be installed", productId));
|
||||
|
||||
Product product = _productManager.GetProduct(productId);
|
||||
if (null == product)
|
||||
{
|
||||
Log(string.Format("Product {0} not found", productId));
|
||||
continue;
|
||||
}
|
||||
if (product.IsInstalled(true))
|
||||
{
|
||||
Log(string.Format("Product {0} is installed", product.Title));
|
||||
}
|
||||
else
|
||||
{
|
||||
Log(string.Format("Adding product {0} with dependencies", product.Title));
|
||||
// search and add dependencies but skip webmatrix/iisexpress branches
|
||||
AddProductWithDependencies(product, productsToInstall, WebMatrixChoiceProduct);
|
||||
}
|
||||
}
|
||||
|
||||
return productsToInstall;
|
||||
}
|
||||
|
||||
public string GetLogFileDirectory()
|
||||
{
|
||||
return _LogFileDirectory;
|
||||
}
|
||||
|
||||
|
||||
private Language GetLanguage(string languageId)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(languageId))
|
||||
{
|
||||
return _productManager.GetLanguage(languageId);
|
||||
}
|
||||
|
||||
return _productManager.GetLanguage(DeafultLanguage);
|
||||
}
|
||||
|
||||
|
||||
// GetTabs
|
||||
public ReadOnlyCollection<Tab> GetTabs()
|
||||
{
|
||||
return _productManager.Tabs;
|
||||
}
|
||||
|
||||
public Tab GetTab(string tabId)
|
||||
{
|
||||
return _productManager.GetTab(tabId);
|
||||
}
|
||||
|
||||
// GetKeywords
|
||||
public ReadOnlyCollection<Keyword> GetKeywords()
|
||||
{
|
||||
return _productManager.Keywords;
|
||||
}
|
||||
|
||||
public List<Product> GetApplications(string keywordId)
|
||||
{
|
||||
|
||||
Keyword keyword = null;
|
||||
if (!string.IsNullOrEmpty(keywordId))
|
||||
{
|
||||
keyword = _productManager.GetKeyword(keywordId);
|
||||
}
|
||||
|
||||
|
||||
|
||||
List<Product> products = new List<Product>();
|
||||
|
||||
Language lang = GetLanguage(_resourceLanguage);
|
||||
Language langDefault = GetLanguage(DeafultLanguage);
|
||||
|
||||
foreach (Product product in _productManager.Products)
|
||||
{
|
||||
if (!product.IsApplication)
|
||||
{
|
||||
// skip
|
||||
continue;
|
||||
}
|
||||
|
||||
//Check language
|
||||
if (
|
||||
lang.AvailableProducts.Contains(product) ||
|
||||
langDefault.AvailableProducts.Contains(product)
|
||||
)
|
||||
{
|
||||
if (null == keyword)
|
||||
{
|
||||
products.Add(product);
|
||||
}
|
||||
else if (product.Keywords.Contains(keyword))
|
||||
{
|
||||
products.Add(product);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//Sort by Title
|
||||
products.Sort(delegate(Product a, Product b)
|
||||
{
|
||||
return a.Title.CompareTo(b.Title);
|
||||
});
|
||||
|
||||
|
||||
return products;
|
||||
}
|
||||
|
||||
public Product GetProduct(string productId)
|
||||
{
|
||||
return _productManager.GetProduct(productId);
|
||||
}
|
||||
|
||||
public IList<DeclaredParameter> GetAppDecalredParameters(string productId)
|
||||
{
|
||||
Product app = _productManager.GetProduct(productId);
|
||||
Installer appInstaller = app.GetInstaller(GetLanguage(null));
|
||||
return appInstaller.MSDeployPackage.DeclaredParameters;
|
||||
}
|
||||
|
||||
public void InstallProducts(
|
||||
IEnumerable<string> productIdsToInstall,
|
||||
string languageId,
|
||||
EventHandler<InstallStatusEventArgs> installStatusUpdatedHandler,
|
||||
EventHandler<EventArgs> installCompleteHandler)
|
||||
{
|
||||
|
||||
// Get products & dependencies list to install
|
||||
List<Product> productsToInstall = GetProductsWithDependencies(productIdsToInstall);
|
||||
|
||||
// Get installers
|
||||
Language lang = GetLanguage(languageId);
|
||||
List<Installer> installersToUse = GetInstallers(productsToInstall, lang );
|
||||
|
||||
|
||||
// Prepare install manager & set event handlers
|
||||
_installManager = new InstallManager();
|
||||
_installManager.Load(installersToUse);
|
||||
|
||||
|
||||
if (null != installStatusUpdatedHandler)
|
||||
{
|
||||
_installManager.InstallerStatusUpdated += installStatusUpdatedHandler;
|
||||
}
|
||||
_installManager.InstallerStatusUpdated += InstallManager_InstallerStatusUpdated;
|
||||
|
||||
if (null != installCompleteHandler)
|
||||
{
|
||||
_installManager.InstallCompleted += installCompleteHandler;
|
||||
}
|
||||
_installManager.InstallCompleted += InstallManager_InstallCompleted;
|
||||
|
||||
// Download installer files
|
||||
foreach (InstallerContext installerContext in _installManager.InstallerContexts)
|
||||
{
|
||||
if (null != installerContext.Installer.InstallerFile)
|
||||
{
|
||||
string failureReason;
|
||||
if (!_installManager.DownloadInstallerFile(installerContext, out failureReason))
|
||||
{
|
||||
Log(string.Format("DownloadInstallerFile '{0}' failed: {1}",
|
||||
installerContext.Installer.InstallerFile.InstallerUrl, failureReason));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (installersToUse.Count > 0)
|
||||
{
|
||||
// Start installation
|
||||
_installCompleted = false;
|
||||
Log("_installManager.StartInstallation()");
|
||||
_installManager.StartInstallation();
|
||||
|
||||
Log("_installManager.StartInstallation() done");
|
||||
while (!_installCompleted)
|
||||
{
|
||||
Thread.Sleep(100);
|
||||
}
|
||||
|
||||
//save logs
|
||||
SaveLogDirectory();
|
||||
|
||||
|
||||
_installCompleted = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
Log("Nothing to install");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public bool InstallApplication(
|
||||
string appId,
|
||||
List<WpiUpdatedDeploymentParameter> updatedValues,
|
||||
string languageId,
|
||||
EventHandler<InstallStatusEventArgs> installStatusUpdatedHandler,
|
||||
EventHandler<EventArgs> installCompleteHandler,
|
||||
out string log,
|
||||
out string failedMessage
|
||||
)
|
||||
{
|
||||
|
||||
Product app = GetProduct(appId);
|
||||
Installer appInstaller = app.GetInstaller(GetLanguage(languageId));
|
||||
WpiAppInstallLogger logger = new WpiAppInstallLogger();
|
||||
|
||||
if (null != installStatusUpdatedHandler)
|
||||
{
|
||||
_installManager.InstallerStatusUpdated += installStatusUpdatedHandler;
|
||||
}
|
||||
_installManager.InstallerStatusUpdated += logger.HanlderInstallerStatusUpdated;
|
||||
|
||||
if (null != installCompleteHandler)
|
||||
{
|
||||
_installManager.InstallCompleted += installCompleteHandler;
|
||||
}
|
||||
_installManager.InstallCompleted += logger.HandlerInstallCompleted;
|
||||
|
||||
// set updated parameters
|
||||
foreach (WpiUpdatedDeploymentParameter parameter in updatedValues)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(parameter.Value))
|
||||
{
|
||||
appInstaller.MSDeployPackage.SetParameters[parameter.Name] = parameter.Value;
|
||||
}
|
||||
}
|
||||
|
||||
DeploymentWellKnownTag dbTag = (DeploymentWellKnownTag)GetDbTag(updatedValues);
|
||||
|
||||
// remove parameters with alien db tags
|
||||
foreach (DeclaredParameter parameter in appInstaller.MSDeployPackage.DeclaredParameters)
|
||||
{
|
||||
if (IsAlienDbTaggedParameter(dbTag, parameter))
|
||||
{
|
||||
appInstaller.MSDeployPackage.RemoveParameters.Add(parameter.Name);
|
||||
}
|
||||
}
|
||||
|
||||
// skip alien directives
|
||||
RemoveUnusedProviders(appInstaller.MSDeployPackage, dbTag);
|
||||
|
||||
_installCompleted = false;
|
||||
Log("_installManager.StartApplicationInstallation()");
|
||||
_installManager.StartApplicationInstallation();
|
||||
while (!_installCompleted)
|
||||
{
|
||||
Thread.Sleep(1000);
|
||||
}
|
||||
Log("_installManager.StartApplicationInstallation() _installCompleted");
|
||||
|
||||
//save logs
|
||||
SaveLogDirectory();
|
||||
|
||||
_installCompleted = false;
|
||||
|
||||
log = logger.GetLog();
|
||||
failedMessage = logger.FailedMessage;
|
||||
|
||||
return !logger.IsFailed;
|
||||
}
|
||||
|
||||
public bool IsKeywordApplication(Keyword keyword)
|
||||
{
|
||||
//if all products are Application
|
||||
foreach (Product product in keyword.Products)
|
||||
{
|
||||
if (!product.IsApplication)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
#endregion Public interface
|
||||
|
||||
|
||||
#region private members
|
||||
|
||||
private void LogDebugInfo()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
sb.Append("Products: ");
|
||||
|
||||
sb.Append("Tabs: ").AppendLine();
|
||||
foreach (Tab tab in _productManager.Tabs)
|
||||
{
|
||||
sb.AppendFormat("\t{0}, FromCustomFeed = {1}", tab.Name, tab.FromCustomFeed).AppendLine();
|
||||
foreach (string f in tab.FeedList)
|
||||
{
|
||||
sb.AppendFormat("\t\t{0}", f).AppendLine();
|
||||
}
|
||||
sb.AppendLine();
|
||||
}
|
||||
sb.AppendLine();
|
||||
|
||||
sb.Append("Keywords: ").AppendLine().Append("\t");
|
||||
foreach (Keyword keyword in _productManager.Keywords)
|
||||
{
|
||||
sb.Append(keyword.Id).Append(",");
|
||||
}
|
||||
sb.AppendLine();
|
||||
|
||||
sb.Append("Languages: ").AppendLine().Append("\t");
|
||||
foreach (Language language in _productManager.Languages)
|
||||
{
|
||||
sb.Append(language.Name).Append(",");
|
||||
}
|
||||
sb.AppendLine();
|
||||
|
||||
Log(sb.ToString());
|
||||
}
|
||||
|
||||
private static void Log(string message)
|
||||
{
|
||||
//#if DEBUG
|
||||
Debug.WriteLine(string.Format("[{0}] WpiHelper: {1}", Process.GetCurrentProcess().Id, message));
|
||||
Console.WriteLine(message);
|
||||
//#endif
|
||||
}
|
||||
|
||||
public List<Product> GetProducts(string FeedLocation, string keywordId)
|
||||
{
|
||||
Keyword keyword = null;
|
||||
if (!string.IsNullOrEmpty(keywordId))
|
||||
{
|
||||
keyword = _productManager.GetKeyword(keywordId);
|
||||
}
|
||||
|
||||
List<Product> products = new List<Product>();
|
||||
|
||||
foreach (Product product in _productManager.Products)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(FeedLocation) && string.Compare(product.FeedLocation, FeedLocation, StringComparison.OrdinalIgnoreCase) != 0)
|
||||
{
|
||||
// if FeedLocation defined, then select products only from this feed location
|
||||
continue;
|
||||
}
|
||||
|
||||
if (null == product.Installers || product.Installers.Count == 0)
|
||||
{
|
||||
// skip this product
|
||||
// usually product without intsallers user as product detection
|
||||
continue;
|
||||
}
|
||||
|
||||
if (null == keyword)
|
||||
{
|
||||
products.Add(product);
|
||||
}
|
||||
else if (product.Keywords.Contains(keyword))
|
||||
{
|
||||
products.Add(product);
|
||||
}
|
||||
}
|
||||
|
||||
//Sort by Title
|
||||
products.Sort(delegate(Product a, Product b)
|
||||
{
|
||||
return a.Title.CompareTo(b.Title);
|
||||
});
|
||||
|
||||
return products;
|
||||
}
|
||||
|
||||
public List<Product> GetProductsFiltered(string filter)
|
||||
{
|
||||
|
||||
List<Product> products = new List<Product>();
|
||||
|
||||
foreach (Product product in _productManager.Products)
|
||||
{
|
||||
if (null == product.Installers || product.Installers.Count == 0)
|
||||
{
|
||||
// skip this product
|
||||
// usually product without intsallers user as product detection
|
||||
continue;
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(filter))
|
||||
{
|
||||
products.Add(product);
|
||||
}
|
||||
else if (product.Title.ToLower().Contains(filter.ToLower()))
|
||||
{
|
||||
products.Add(product);
|
||||
}
|
||||
}
|
||||
|
||||
//Sort by Title
|
||||
products.Sort(delegate(Product a, Product b)
|
||||
{
|
||||
return a.Title.CompareTo(b.Title);
|
||||
});
|
||||
|
||||
|
||||
return products;
|
||||
}
|
||||
|
||||
|
||||
private void InstallManager_InstallCompleted(object sender, EventArgs e)
|
||||
{
|
||||
Log("Installation completed");
|
||||
if (null != _installManager)
|
||||
{
|
||||
/*
|
||||
try
|
||||
{
|
||||
_installManager.Dispose();
|
||||
} catch(Exception ex)
|
||||
{
|
||||
Log("InstallManager_InstallCompleted Exception: "+ex.ToString());
|
||||
}
|
||||
_installManager = null;
|
||||
*/
|
||||
}
|
||||
_installCompleted = true;
|
||||
}
|
||||
|
||||
private void InstallManager_InstallerStatusUpdated(object sender, InstallStatusEventArgs e)
|
||||
{
|
||||
Log(string.Format("{0}: {1}. {2} Progress: {3}",
|
||||
e.InstallerContext.ProductName,
|
||||
e.InstallerContext.InstallationState,
|
||||
e.InstallerContext.ReturnCode.DetailedInformation,
|
||||
e.ProgressValue));
|
||||
}
|
||||
|
||||
private static void AddProductWithDependencies(Product product, List<Product> productsToInstall, string skipProduct)
|
||||
{
|
||||
if (!productsToInstall.Contains(product))
|
||||
{
|
||||
productsToInstall.Add(product);
|
||||
}
|
||||
|
||||
ICollection<Product> missingDependencies = product.GetMissingDependencies(productsToInstall);
|
||||
if (missingDependencies != null)
|
||||
{
|
||||
foreach (Product dependency in missingDependencies)
|
||||
{
|
||||
if (string.Equals(dependency.ProductId, skipProduct, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
Log(string.Format("Product {0} is iis express dependency, skip it", dependency.Title));
|
||||
continue;
|
||||
}
|
||||
|
||||
AddProductWithDependencies(dependency, productsToInstall, skipProduct);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void SaveLogDirectory()
|
||||
{
|
||||
Log("SaveLogDirectory");
|
||||
foreach (InstallerContext ctx in _installManager.InstallerContexts)
|
||||
{
|
||||
Log(ctx.LogFileDirectory);
|
||||
_LogFileDirectory = ctx.LogFileDirectory;
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private DeploymentWellKnownTag GetDbTag(List<WpiUpdatedDeploymentParameter> parameters)
|
||||
{
|
||||
foreach (WpiUpdatedDeploymentParameter parameter in parameters)
|
||||
{
|
||||
if ((parameter.WellKnownTags & databaseEngineTags) != 0)
|
||||
{
|
||||
return (DeploymentWellKnownTag)Enum.Parse(
|
||||
typeof(DeploymentWellKnownTag),
|
||||
(parameter.WellKnownTags & databaseEngineTags).ToString().Split(',')[0]);
|
||||
}
|
||||
}
|
||||
|
||||
return DeploymentWellKnownTag.None;
|
||||
}
|
||||
|
||||
private static bool IsAlienDbTaggedParameter(DeploymentWellKnownTag dbTag, DeclaredParameter parameter)
|
||||
{
|
||||
return (parameter.Tags & databaseEngineTags) != DeploymentWellKnownTag.None
|
||||
&&
|
||||
(parameter.Tags & dbTag) == DeploymentWellKnownTag.None;
|
||||
}
|
||||
|
||||
private static void RemoveUnusedProviders(MSDeployPackage msDeployPackage, DeploymentWellKnownTag dbTag)
|
||||
{
|
||||
List<string> providersToRemove = new List<string>();
|
||||
|
||||
switch (dbTag)
|
||||
{
|
||||
case DeploymentWellKnownTag.MySql:
|
||||
providersToRemove.Add("dbFullSql");
|
||||
providersToRemove.Add("DBSqlite");
|
||||
break;
|
||||
case DeploymentWellKnownTag.Sql:
|
||||
providersToRemove.Add("dbMySql");
|
||||
providersToRemove.Add("DBSqlite");
|
||||
break;
|
||||
case DeploymentWellKnownTag.FlatFile:
|
||||
providersToRemove.Add("dbFullSql");
|
||||
providersToRemove.Add("DBSqlite");
|
||||
providersToRemove.Add("dbMySql");
|
||||
break;
|
||||
case DeploymentWellKnownTag.SqLite:
|
||||
providersToRemove.Add("dbFullSql");
|
||||
providersToRemove.Add("dbMySql");
|
||||
break;
|
||||
case DeploymentWellKnownTag.VistaDB:
|
||||
providersToRemove.Add("dbFullSql");
|
||||
providersToRemove.Add("DBSqlite");
|
||||
providersToRemove.Add("dbMySql");
|
||||
break;
|
||||
case DeploymentWellKnownTag.SqlCE:
|
||||
providersToRemove.Add("dbFullSql");
|
||||
providersToRemove.Add("DBSqlite");
|
||||
providersToRemove.Add("dbMySql");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
foreach (string provider in providersToRemove)
|
||||
{
|
||||
msDeployPackage.SkipDirectives.Add(string.Format("objectName={0}", provider));
|
||||
}
|
||||
}
|
||||
|
||||
#endregion private members
|
||||
}
|
||||
|
||||
class WpiAppInstallLogger
|
||||
{
|
||||
private StringBuilder sb;
|
||||
private InstallReturnCode _installReturnCode;
|
||||
private string _failedMessage = string.Empty;
|
||||
|
||||
public WpiAppInstallLogger()
|
||||
{
|
||||
sb = new StringBuilder();
|
||||
}
|
||||
|
||||
public InstallReturnCode ReturnCode
|
||||
{
|
||||
get { return _installReturnCode; }
|
||||
}
|
||||
|
||||
public string FailedMessage
|
||||
{
|
||||
get { return _failedMessage; }
|
||||
}
|
||||
|
||||
public bool IsFailed
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null != _installReturnCode)
|
||||
{
|
||||
return _installReturnCode.Status == InstallReturnCodeStatus.Failure ||
|
||||
_installReturnCode.Status == InstallReturnCodeStatus.FailureRebootRequired;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public void HanlderInstallerStatusUpdated(object sender, InstallStatusEventArgs e)
|
||||
{
|
||||
sb.AppendFormat("{0}: {1}. {2} Progress: {3}",
|
||||
e.InstallerContext.ProductName,
|
||||
e.InstallerContext.InstallationState,
|
||||
e.InstallerContext.ReturnCode.DetailedInformation,
|
||||
e.ProgressValue).AppendLine();
|
||||
}
|
||||
|
||||
public void HandlerInstallCompleted(object sender, EventArgs e)
|
||||
{
|
||||
InstallManager installManager = sender as InstallManager;
|
||||
if (null != installManager)
|
||||
{
|
||||
InstallerContext installerContext;
|
||||
if (null != installManager.InstallerContexts && installManager.InstallerContexts.Count>0)
|
||||
{
|
||||
installerContext = installManager.InstallerContexts[0];
|
||||
_installReturnCode = installerContext.ReturnCode;
|
||||
}
|
||||
}
|
||||
|
||||
if (null != _installReturnCode)
|
||||
{
|
||||
_failedMessage = string.Format("{0}: {1}",
|
||||
_installReturnCode.Status,
|
||||
_installReturnCode.DetailedInformation);
|
||||
sb.AppendFormat("Return Code: {0}", _failedMessage).AppendLine();
|
||||
}
|
||||
sb.AppendLine("Installation completed");
|
||||
}
|
||||
|
||||
public string GetLog()
|
||||
{
|
||||
return sb.ToString();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -119,7 +119,7 @@
|
|||
algorithmSuite="Default" />
|
||||
</security>
|
||||
</binding>
|
||||
</wsHttpBinding>
|
||||
</bindings>
|
||||
</wsHttpBinding>
|
||||
</bindings>
|
||||
</system.serviceModel>
|
||||
</configuration>
|
||||
|
|
|
@ -1062,12 +1062,62 @@ namespace WebsitePanel.Server
|
|||
|
||||
#region Web Application Gallery
|
||||
[WebMethod, SoapHeader("settings")]
|
||||
public GalleryCategoriesResult GetGalleryCategories()
|
||||
public void InitFeeds(int UserId, string[] feeds)
|
||||
{
|
||||
try
|
||||
{
|
||||
Log.WriteStart("'{0}' InitFeeds", ProviderSettings.ProviderName);
|
||||
WebProvider.InitFeeds(UserId, feeds);
|
||||
Log.WriteEnd("'{0}' InitFeeds", ProviderSettings.ProviderName);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteError(String.Format("'{0}' InitFeeds", ProviderSettings.ProviderName), ex);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
[WebMethod, SoapHeader("settings")]
|
||||
public void SetResourceLanguage(int UserId, string resourceLanguage)
|
||||
{
|
||||
try
|
||||
{
|
||||
Log.WriteStart("'{0}' SetResourceLanguage", ProviderSettings.ProviderName);
|
||||
WebProvider.SetResourceLanguage(UserId,resourceLanguage);
|
||||
Log.WriteEnd("'{0}' SetResourceLanguage", ProviderSettings.ProviderName);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteError(String.Format("'{0}' SetResourceLanguage", ProviderSettings.ProviderName), ex);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[WebMethod, SoapHeader("settings")]
|
||||
public GalleryLanguagesResult GetGalleryLanguages(int UserId)
|
||||
{
|
||||
try
|
||||
{
|
||||
Log.WriteStart("'{0}' GalleryLanguagesResult", ProviderSettings.ProviderName);
|
||||
GalleryLanguagesResult result = WebProvider.GetGalleryLanguages(UserId);
|
||||
Log.WriteEnd("'{0}' GalleryLanguagesResult", ProviderSettings.ProviderName);
|
||||
return result;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteError(String.Format("'{0}' GalleryLanguagesResult", ProviderSettings.ProviderName), ex);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
[WebMethod, SoapHeader("settings")]
|
||||
public GalleryCategoriesResult GetGalleryCategories(int UserId)
|
||||
{
|
||||
try
|
||||
{
|
||||
Log.WriteStart("'{0}' GalleryCategoriesResult", ProviderSettings.ProviderName);
|
||||
GalleryCategoriesResult result = WebProvider.GetGalleryCategories();
|
||||
GalleryCategoriesResult result = WebProvider.GetGalleryCategories(UserId);
|
||||
Log.WriteEnd("'{0}' GalleryCategoriesResult", ProviderSettings.ProviderName);
|
||||
return result;
|
||||
}
|
||||
|
@ -1079,12 +1129,12 @@ namespace WebsitePanel.Server
|
|||
}
|
||||
|
||||
[WebMethod, SoapHeader("settings")]
|
||||
public GalleryApplicationsResult GetGalleryApplications(string categoryId)
|
||||
public GalleryApplicationsResult GetGalleryApplications(int UserId, string categoryId)
|
||||
{
|
||||
try
|
||||
{
|
||||
Log.WriteStart("'{0}' GetGalleryApplications", ProviderSettings.ProviderName);
|
||||
GalleryApplicationsResult result = WebProvider.GetGalleryApplications(categoryId);
|
||||
GalleryApplicationsResult result = WebProvider.GetGalleryApplications(UserId,categoryId);
|
||||
Log.WriteEnd("'{0}' GetGalleryApplications", ProviderSettings.ProviderName);
|
||||
return result;
|
||||
}
|
||||
|
@ -1094,7 +1144,26 @@ namespace WebsitePanel.Server
|
|||
throw;
|
||||
}
|
||||
}
|
||||
[WebMethod, SoapHeader("settings")]
|
||||
|
||||
[WebMethod, SoapHeader("settings")]
|
||||
public GalleryApplicationsResult GetGalleryApplicationsFiltered(int UserId, string pattern)
|
||||
{
|
||||
try
|
||||
{
|
||||
Log.WriteStart("'{0}' GetGalleryApplicationsFiltered", ProviderSettings.ProviderName);
|
||||
GalleryApplicationsResult result = WebProvider.GetGalleryApplicationsFiltered(UserId,pattern);
|
||||
Log.WriteEnd("'{0}' GetGalleryApplicationsFiltered", ProviderSettings.ProviderName);
|
||||
return result;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteError(String.Format("'{0}' GetGalleryApplicationsFiltered", ProviderSettings.ProviderName), ex);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[WebMethod, SoapHeader("settings")]
|
||||
public bool IsMsDeployInstalled()
|
||||
{
|
||||
try
|
||||
|
@ -1111,13 +1180,13 @@ namespace WebsitePanel.Server
|
|||
}
|
||||
}
|
||||
|
||||
[WebMethod, SoapHeader("settings")]
|
||||
public GalleryApplicationResult GetGalleryApplication(string id)
|
||||
[WebMethod, SoapHeader("settings")]
|
||||
public GalleryApplicationResult GetGalleryApplication(int UserId, string id)
|
||||
{
|
||||
try
|
||||
{
|
||||
Log.WriteStart("'{0}' GetGalleryApplication", ProviderSettings.ProviderName);
|
||||
GalleryApplicationResult result = WebProvider.GetGalleryApplication(id);
|
||||
GalleryApplicationResult result = WebProvider.GetGalleryApplication(UserId,id);
|
||||
Log.WriteEnd("'{0}' GetGalleryApplication", ProviderSettings.ProviderName);
|
||||
return result;
|
||||
}
|
||||
|
@ -1128,13 +1197,13 @@ namespace WebsitePanel.Server
|
|||
}
|
||||
}
|
||||
|
||||
[WebMethod, SoapHeader("settings")]
|
||||
public GalleryWebAppStatus GetGalleryApplicationStatus(string id)
|
||||
[WebMethod, SoapHeader("settings")]
|
||||
public GalleryWebAppStatus GetGalleryApplicationStatus(int UserId, string id)
|
||||
{
|
||||
try
|
||||
{
|
||||
Log.WriteStart("'{0}' GetGalleryApplicationStatus", ProviderSettings.ProviderName);
|
||||
GalleryWebAppStatus result = WebProvider.GetGalleryApplicationStatus(id);
|
||||
GalleryWebAppStatus result = WebProvider.GetGalleryApplicationStatus(UserId,id);
|
||||
Log.WriteEnd("'{0}' GetGalleryApplicationStatus", ProviderSettings.ProviderName);
|
||||
return result;
|
||||
}
|
||||
|
@ -1144,14 +1213,14 @@ namespace WebsitePanel.Server
|
|||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
[WebMethod, SoapHeader("settings")]
|
||||
public GalleryWebAppStatus DownloadGalleryApplication(string id)
|
||||
|
||||
[WebMethod, SoapHeader("settings")]
|
||||
public GalleryWebAppStatus DownloadGalleryApplication(int UserId, string id)
|
||||
{
|
||||
try
|
||||
{
|
||||
Log.WriteStart("'{0}' DownloadGalleryApplication", ProviderSettings.ProviderName);
|
||||
GalleryWebAppStatus result = WebProvider.DownloadGalleryApplication(id);
|
||||
GalleryWebAppStatus result = WebProvider.DownloadGalleryApplication(UserId,id);
|
||||
Log.WriteEnd("'{0}' DownloadGalleryApplication", ProviderSettings.ProviderName);
|
||||
return result;
|
||||
}
|
||||
|
@ -1162,13 +1231,13 @@ namespace WebsitePanel.Server
|
|||
}
|
||||
}
|
||||
|
||||
[WebMethod, SoapHeader("settings")]
|
||||
public DeploymentParametersResult GetGalleryApplicationParameters(string id)
|
||||
[WebMethod, SoapHeader("settings")]
|
||||
public DeploymentParametersResult GetGalleryApplicationParameters(int UserId, string id)
|
||||
{
|
||||
try
|
||||
{
|
||||
Log.WriteStart("'{0}' GetGalleryApplicationParameters", ProviderSettings.ProviderName);
|
||||
DeploymentParametersResult result = WebProvider.GetGalleryApplicationParameters(id);
|
||||
DeploymentParametersResult result = WebProvider.GetGalleryApplicationParameters(UserId,id);
|
||||
Log.WriteEnd("'{0}' GetGalleryApplicationParameters", ProviderSettings.ProviderName);
|
||||
return result;
|
||||
}
|
||||
|
@ -1179,13 +1248,13 @@ namespace WebsitePanel.Server
|
|||
}
|
||||
}
|
||||
|
||||
[WebMethod, SoapHeader("settings")]
|
||||
public StringResultObject InstallGalleryApplication(string id, List<DeploymentParameter> updatedValues)
|
||||
[WebMethod, SoapHeader("settings")]
|
||||
public StringResultObject InstallGalleryApplication(int UserId, string id, List<DeploymentParameter> updatedValues, string languageId)
|
||||
{
|
||||
try
|
||||
{
|
||||
Log.WriteStart("'{0}' InstallGalleryApplication", ProviderSettings.ProviderName);
|
||||
StringResultObject result = WebProvider.InstallGalleryApplication(id, updatedValues);
|
||||
StringResultObject result = WebProvider.InstallGalleryApplication(UserId,id, updatedValues, languageId);
|
||||
Log.WriteEnd("'{0}' InstallGalleryApplication", ProviderSettings.ProviderName);
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -42,6 +42,14 @@
|
|||
<WarningsAsErrors>618</WarningsAsErrors>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.Web.Deployment, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\Lib\References\Microsoft\Microsoft.Web.Deployment.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Web.PlatformInstaller, Version=3.0.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\Lib\Microsoft.Web.PlatformInstaller.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\Lib\Microsoft.Web.Services3.dll</HintPath>
|
||||
|
@ -52,6 +60,8 @@
|
|||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Management" />
|
||||
<Reference Include="System.Runtime.Remoting" />
|
||||
<Reference Include="System.ServiceModel" />
|
||||
<Reference Include="System.ServiceProcess" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Web.DynamicData" />
|
||||
|
@ -113,6 +123,7 @@
|
|||
<DependentUpon>LyncServer.asmx</DependentUpon>
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Code\WPIHelper.cs" />
|
||||
<Compile Include="OCSEdgeServer.asmx.cs">
|
||||
<DependentUpon>OCSEdgeServer.asmx</DependentUpon>
|
||||
<SubType>Component</SubType>
|
||||
|
@ -206,6 +217,10 @@
|
|||
<Project>{E91E52F3-9555-4D00-B577-2B1DBDD87CA7}</Project>
|
||||
<Name>WebsitePanel.Server.Utils</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\WebsitePanel.Server.WPIServiceContract\WebsitePanel.Server.WPIServiceContract.csproj">
|
||||
<Project>{736FA0F0-ECA3-416E-B299-85CC425FFF44}</Project>
|
||||
<Name>WebsitePanel.Server.WPIServiceContract</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="WsePolicyCache.Config" />
|
||||
|
|
|
@ -29,6 +29,9 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Data;
|
||||
using System.Security;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Web;
|
||||
using System.Diagnostics;
|
||||
using System.Collections;
|
||||
|
@ -38,11 +41,20 @@ using System.Web.Services.Protocols;
|
|||
using System.ComponentModel;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.ServiceProcess;
|
||||
using System.ServiceModel;
|
||||
using System.Runtime.Remoting;
|
||||
using System.Runtime.Remoting.Channels;
|
||||
using System.Runtime.Remoting.Channels.Tcp;
|
||||
using System.Management;
|
||||
using System.Collections.Specialized;
|
||||
using Microsoft.Web.PlatformInstaller;
|
||||
using Microsoft.Web.Services3;
|
||||
|
||||
using WebsitePanel.Providers.Utils;
|
||||
using WebsitePanel.Server.Code;
|
||||
using WebsitePanel.Server.Utils;
|
||||
using WebsitePanel.Providers;
|
||||
using WebsitePanel.Server.WPIService;
|
||||
|
||||
|
||||
namespace WebsitePanel.Server
|
||||
{
|
||||
|
@ -280,6 +292,554 @@ namespace WebsitePanel.Server
|
|||
}
|
||||
#endregion
|
||||
|
||||
#region Web Platform Installer
|
||||
|
||||
|
||||
|
||||
private string makeHref(string value)
|
||||
{
|
||||
if (string.IsNullOrEmpty(value))
|
||||
return value;
|
||||
|
||||
//" qweqwe http://www.helicontech.com/zoo/feed/ asdasdasd"
|
||||
Regex link =new Regex("(http[^\\s,]+)(?<![.,])");
|
||||
|
||||
return link.Replace(value,"<a href=\"$1\" target=\"_blank\">$1</a>");
|
||||
}
|
||||
|
||||
|
||||
private WPIProduct ProductToWPIProduct(Product product)
|
||||
{
|
||||
WPIProduct p = new WPIProduct();
|
||||
p.ProductId = product.ProductId;
|
||||
p.Summary = product.Summary;
|
||||
p.LongDescription = makeHref(product.LongDescription);
|
||||
p.Published = product.Published;
|
||||
p.Author = product.Author;
|
||||
p.AuthorUri = (product.AuthorUri != null) ? product.AuthorUri.ToString() : "";
|
||||
p.Title = product.Title;
|
||||
p.Link = (product.Link != null) ? product.Link.ToString() : "";
|
||||
p.Version = product.Version;
|
||||
|
||||
if (product.Installers.Count > 0)
|
||||
{
|
||||
if (product.Installers[0].EulaUrl != null)
|
||||
{
|
||||
p.EulaUrl = product.Installers[0].EulaUrl.ToString();
|
||||
|
||||
}
|
||||
|
||||
if (product.Installers[0].InstallerFile != null)
|
||||
{
|
||||
if (product.Installers[0].InstallerFile.InstallerUrl != null)
|
||||
{
|
||||
p.DownloadedLocation = product.Installers[0].InstallerFile.InstallerUrl.ToString();
|
||||
}
|
||||
p.FileSize = product.Installers[0].InstallerFile.FileSize;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (product.IconUrl != null)
|
||||
{
|
||||
p.Logo = product.IconUrl.ToString();
|
||||
}
|
||||
|
||||
p.IsInstalled = product.IsInstalled(true);
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public WPIProduct[] GetWPIProducts(string tabId, string keywordId)
|
||||
{
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
Log.WriteStart("GetWPIProducts");
|
||||
List<WPIProduct> wpiProducts = new List<WPIProduct>();
|
||||
|
||||
|
||||
WpiHelper wpi = GetWpiFeed();
|
||||
|
||||
string feedLocation = null;
|
||||
if (tabId != null)
|
||||
{
|
||||
Tab tab = wpi.GetTab(tabId);
|
||||
ICollection<string> feeds = tab.FeedList;
|
||||
feedLocation = feeds.GetEnumerator().Current;
|
||||
}
|
||||
|
||||
List<Product> products = wpi.GetProducts(feedLocation, keywordId);
|
||||
|
||||
if (products != null)
|
||||
{
|
||||
|
||||
|
||||
foreach (Product product in products)
|
||||
{
|
||||
if (null != product && !product.IsApplication)
|
||||
{
|
||||
wpiProducts.Add(ProductToWPIProduct(product));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Log.WriteEnd("GetWPIProducts");
|
||||
return wpiProducts.ToArray();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteError("GetWPIProducts", ex);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[WebMethod]
|
||||
public WPIProduct[] GetWPIProductsFiltered(string filter)
|
||||
{
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
Log.WriteStart("GetWPIProductsFiltered");
|
||||
List<WPIProduct> wpiProducts = new List<WPIProduct>();
|
||||
|
||||
|
||||
WpiHelper wpi = GetWpiFeed();
|
||||
|
||||
List<Product> products = wpi.GetProductsFiltered( filter);
|
||||
|
||||
if (products != null)
|
||||
{
|
||||
|
||||
|
||||
foreach (Product product in products)
|
||||
{
|
||||
if (null != product && !product.IsApplication)
|
||||
{
|
||||
wpiProducts.Add(ProductToWPIProduct(product));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Log.WriteEnd("GetWPIProductsFiltered");
|
||||
return wpiProducts.ToArray();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteError("GetWPIProductsFiltered", ex);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public WPITab[] GetWPITabs()
|
||||
{
|
||||
try
|
||||
{
|
||||
Log.WriteStart("GetWPITabs");
|
||||
|
||||
WpiHelper wpi = GetWpiFeed();
|
||||
|
||||
List<WPITab> result = new List<WPITab>();
|
||||
|
||||
foreach (Tab tab in wpi.GetTabs())
|
||||
{
|
||||
result.Add(new WPITab(tab.Id, tab.Name));
|
||||
}
|
||||
|
||||
|
||||
Log.WriteEnd("GetWPITabs");
|
||||
|
||||
return result.ToArray();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteError("GetWPITabs", ex);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static string[] FEEDS = new string[]
|
||||
{
|
||||
// "https://www.microsoft.com/web/webpi/3.0/WebProductList.xml",
|
||||
// "http://www.helicontech.com/zoo/feed/"
|
||||
};
|
||||
|
||||
[WebMethod]
|
||||
public void InitWPIFeeds(string feedUrls)
|
||||
{
|
||||
if (string.IsNullOrEmpty(feedUrls))
|
||||
{
|
||||
throw new Exception("Empty feed list");
|
||||
}
|
||||
|
||||
string[] newFEEDS = feedUrls.Split(';');
|
||||
|
||||
if (newFEEDS.Length == 0)
|
||||
{
|
||||
throw new Exception("Empty feed list");
|
||||
}
|
||||
if (!ArraysEqual<string>(newFEEDS, FEEDS))
|
||||
{
|
||||
Log.WriteInfo("InitWPIFeeds - new value: " + feedUrls);
|
||||
|
||||
//Feeds settings have been channged
|
||||
FEEDS = newFEEDS;
|
||||
wpi = null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static bool ArraysEqual<T>(T[] a1, T[] a2)
|
||||
{
|
||||
if (ReferenceEquals(a1, a2))
|
||||
return true;
|
||||
|
||||
if (a1 == null || a2 == null)
|
||||
return false;
|
||||
|
||||
if (a1.Length != a2.Length)
|
||||
return false;
|
||||
|
||||
EqualityComparer<T> comparer = EqualityComparer<T>.Default;
|
||||
for (int i = 0; i < a1.Length; i++)
|
||||
{
|
||||
if (!comparer.Equals(a1[i], a2[i])) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public WPIKeyword[] GetWPIKeywords()
|
||||
{
|
||||
try
|
||||
{
|
||||
Log.WriteStart("GetWPIKeywords");
|
||||
|
||||
WpiHelper wpi = GetWpiFeed();
|
||||
|
||||
List<WPIKeyword> result = new List<WPIKeyword>();
|
||||
|
||||
result.Add(new WPIKeyword("", "All"));
|
||||
|
||||
foreach (Keyword keyword in wpi.GetKeywords())
|
||||
{
|
||||
if (!wpi.IsKeywordApplication(keyword))
|
||||
{
|
||||
result.Add(new WPIKeyword(keyword.Id, keyword.Text));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Log.WriteEnd("GetWPIKeywords");
|
||||
|
||||
return result.ToArray();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteError("GetWPIKeywords", ex);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[WebMethod]
|
||||
public WPIProduct[] GetWPIProductsWithDependencies(string[] products)
|
||||
{
|
||||
try
|
||||
{
|
||||
Log.WriteStart("GetWPIProductsWithDependencies");
|
||||
|
||||
WpiHelper wpi = GetWpiFeed();
|
||||
|
||||
List<WPIProduct> result = new List<WPIProduct>();
|
||||
foreach (Product product in wpi.GetProductsWithDependencies(products))
|
||||
{
|
||||
result.Add(ProductToWPIProduct(product));
|
||||
}
|
||||
|
||||
Log.WriteEnd("GetWPIProductsWithDependencies");
|
||||
|
||||
return result.ToArray();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteError("GetWPIProductsWithDependencies", ex);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
static Process _WpiServiceExe = null;
|
||||
|
||||
[WebMethod]
|
||||
public void InstallWPIProducts(string[] products)
|
||||
{
|
||||
try
|
||||
{
|
||||
Log.WriteStart("InstallWPIProducts");
|
||||
|
||||
StartWpiService();
|
||||
|
||||
RegisterWpiService();
|
||||
|
||||
WPIServiceContract client = new WPIServiceContract();
|
||||
|
||||
client.Initialize(FEEDS);
|
||||
client.BeginInstallation(products);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Log.WriteEnd("InstallWPIProducts");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteError("InstallWPIProducts", ex);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
private void StartWpiService()
|
||||
{
|
||||
string binFolder = HttpContext.Current.Server.MapPath("/bin/");
|
||||
|
||||
string newUserProfile = Path.Combine(Environment.ExpandEnvironmentVariables("%SystemRoot%"), "Temp\\zoo.wpi");
|
||||
string newAppData = Path.Combine(newUserProfile, "Roaming");
|
||||
string newLocalAppData = Path.Combine(newUserProfile, "Local");
|
||||
try
|
||||
{
|
||||
Directory.CreateDirectory(newUserProfile);
|
||||
Directory.CreateDirectory(newAppData);
|
||||
Directory.CreateDirectory(newLocalAppData);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
//throw;
|
||||
}
|
||||
|
||||
|
||||
Process wpiServiceExe = new Process();
|
||||
wpiServiceExe.StartInfo = new ProcessStartInfo(Path.Combine(binFolder, "WebsitePanel.Server.WPIService.exe"));
|
||||
wpiServiceExe.StartInfo.UseShellExecute = false;
|
||||
wpiServiceExe.StartInfo.EnvironmentVariables["UserProfile"] = newUserProfile;
|
||||
wpiServiceExe.StartInfo.EnvironmentVariables["LocalAppData"] = newLocalAppData;
|
||||
wpiServiceExe.StartInfo.EnvironmentVariables["AppData"] = newAppData;
|
||||
if (wpiServiceExe.Start())
|
||||
{
|
||||
_WpiServiceExe = wpiServiceExe;
|
||||
}
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public void CancelInstallWPIProducts()
|
||||
{
|
||||
try
|
||||
{
|
||||
Log.WriteStart("CancelInstallWPIProducts");
|
||||
|
||||
KillWpiService();
|
||||
|
||||
|
||||
Log.WriteEnd("CancelInstallWPIProducts");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteError("CancelInstallWPIProducts", ex);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
private void KillWpiService()
|
||||
{
|
||||
//kill own service
|
||||
if (_WpiServiceExe != null && !_WpiServiceExe.HasExited)
|
||||
{
|
||||
_WpiServiceExe.Kill();
|
||||
_WpiServiceExe = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
//find WebsitePanel.Server.WPIService.exe
|
||||
Process[] wpiservices = Process.GetProcessesByName("WebsitePanel.Server.WPIService");
|
||||
foreach (Process p in wpiservices)
|
||||
{
|
||||
p.Kill();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public string GetWPIStatus()
|
||||
{
|
||||
try
|
||||
{
|
||||
Log.WriteStart("GetWPIStatus");
|
||||
|
||||
RegisterWpiService();
|
||||
|
||||
WPIServiceContract client = new WPIServiceContract();
|
||||
|
||||
string status = client.GetStatus();
|
||||
|
||||
Log.WriteEnd("GetWPIStatus");
|
||||
|
||||
return status; //OK
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
// done or error
|
||||
|
||||
if (_WpiServiceExe == null || _WpiServiceExe.HasExited)
|
||||
{
|
||||
// reset WpiHelper for refresh status
|
||||
wpi = null;
|
||||
return ""; //OK
|
||||
}
|
||||
|
||||
Log.WriteError("GetWPIStatus", ex);
|
||||
|
||||
return ex.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public string WpiGetLogFileDirectory()
|
||||
{
|
||||
try
|
||||
{
|
||||
Log.WriteStart("WpiGetLogFileDirectory");
|
||||
|
||||
RegisterWpiService();
|
||||
|
||||
WPIServiceContract client = new WPIServiceContract();
|
||||
|
||||
string result = client.GetLogFileDirectory();
|
||||
|
||||
Log.WriteEnd("WpiGetLogFileDirectory");
|
||||
|
||||
return result; //OK
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
Log.WriteError("WpiGetLogFileDirectory", ex);
|
||||
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public SettingPair[] WpiGetLogsInDirectory(string Path)
|
||||
{
|
||||
try
|
||||
{
|
||||
Log.WriteStart("WpiGetLogsInDirectory");
|
||||
|
||||
ArrayList result = new ArrayList();
|
||||
|
||||
string[] filePaths = Directory.GetFiles(Path);
|
||||
foreach (string filePath in filePaths)
|
||||
{
|
||||
using (StreamReader streamReader = new StreamReader(filePath))
|
||||
{
|
||||
string fileContent = SecurityElement.Escape(StringUtils.CleanupASCIIControlCharacters(streamReader.ReadToEnd()));
|
||||
result.Add(new SettingPair(filePath, fileContent));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Log.WriteEnd("WpiGetLogFileDirectory");
|
||||
|
||||
return (SettingPair[])result.ToArray(typeof(SettingPair)); //OK
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
Log.WriteError("WpiGetLogFileDirectory", ex);
|
||||
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
static WpiHelper wpi = null;
|
||||
WpiHelper GetWpiFeed()
|
||||
{
|
||||
if (FEEDS.Length == 0)
|
||||
{
|
||||
throw new Exception("Empty feed list");
|
||||
}
|
||||
|
||||
if (null == wpi)
|
||||
{
|
||||
wpi = new WpiHelper(FEEDS);
|
||||
}
|
||||
return wpi;
|
||||
}
|
||||
|
||||
private static object _lockRegisterWpiService = new object();
|
||||
private void RegisterWpiService()
|
||||
{
|
||||
lock (_lockRegisterWpiService)
|
||||
{
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
ChannelServices.RegisterChannel(new TcpChannel(), true);
|
||||
}
|
||||
catch (System.Exception)
|
||||
{
|
||||
//ignor
|
||||
}
|
||||
|
||||
if (null == RemotingConfiguration.IsWellKnownClientType(typeof(WPIServiceContract)))
|
||||
{
|
||||
RemotingConfiguration.RegisterWellKnownClientType(typeof(WPIServiceContract), string.Format("tcp://localhost:{0}/WPIServiceContract", WPIServiceContract.PORT));
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
WPIServiceContract client = new WPIServiceContract();
|
||||
client.Ping();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
//unable to connect
|
||||
//try to restart service
|
||||
KillWpiService();
|
||||
//StartWpiService();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
#endregion GetWPIProducts
|
||||
|
||||
|
||||
#region Event Viewer
|
||||
[WebMethod]
|
||||
public List<string> GetLogNames()
|
||||
|
|
|
@ -174,7 +174,8 @@
|
|||
<Control key="edit_service" src="WebsitePanel/ServersEditService.ascx" title="ServiceProperties" type="View" icon="computer_config_48.png" />
|
||||
<Control key="edit_termservices" src="WebsitePanel/ServersEditTerminalConnections.ascx" title="ManageTerminalConnections" type="View" icon="windows_window_zoom_48.png" />
|
||||
<Control key="edit_winservices" src="WebsitePanel/ServersEditWindowsServices.ascx" title="ManageWindowsServices" type="View" icon="windows_window_config_48.png" />
|
||||
<Control key="backup" src="WebsitePanel/BackupWizard.ascx" title="BackupServer" type="View" />
|
||||
<Control key="edit_platforminstaller" src="WebsitePanel/ServersEditWebPlatformInstaller.ascx" title="ManagePlatformInstaller" type="View" icon="computer_config_48.png" />
|
||||
<Control key="backup" src="WebsitePanel/BackupWizard.ascx" title="BackupServer" type="View" />
|
||||
<Control key="restore" src="WebsitePanel/RestoreWizard.ascx" title="RestoreServer" type="View" />
|
||||
<Control key="edit_htaccessfolder" src="WebsitePanel/WebSitesEditHeliconApeFolder.ascx" title="HeliconApeFolderProperties" type="View" />
|
||||
</Controls>
|
||||
|
|
|
@ -378,6 +378,9 @@
|
|||
<data name="ModuleTitle.ManageWindowsServices" xml:space="preserve">
|
||||
<value>Manage Windows Services</value>
|
||||
</data>
|
||||
<data name="ModuleTitle.ManagePlatformInstaller" xml:space="preserve">
|
||||
<value>Manage Web Platform Installer</value>
|
||||
</data>
|
||||
<data name="ModuleTitle.MyDatabases" xml:space="preserve">
|
||||
<value>My Databases</value>
|
||||
</data>
|
||||
|
|
|
@ -337,7 +337,7 @@
|
|||
<value>Applications Installer</value>
|
||||
</data>
|
||||
<data name="PageName.SpaceWebApplicationsGallery" xml:space="preserve">
|
||||
<value>Microsoft Web App Gallery</value>
|
||||
<value>Web App Gallery</value>
|
||||
</data>
|
||||
<data name="PageTitle.SpaceApplicationsInstaller" xml:space="preserve">
|
||||
<value>{user} - {space} - Applications Installer</value>
|
||||
|
|
|
@ -873,6 +873,9 @@
|
|||
<data name="Error.SERVER_UPDATE_SERVICE_PROPS" xml:space="preserve">
|
||||
<value>Error saving server service settings</value>
|
||||
</data>
|
||||
<data name="Error.WPI_LOAD_FEED" xml:space="preserve">
|
||||
<value>Error loading feeds. Please check system settings</value>
|
||||
</data>
|
||||
<data name="Error.SPACE_LETTER_GET" xml:space="preserve">
|
||||
<value>Error building hosting space summary letter</value>
|
||||
</data>
|
||||
|
@ -4604,7 +4607,7 @@
|
|||
<value>OCS users quota has been reached.</value>
|
||||
</data>
|
||||
<data name="Quota.Web.WebAppGallery" xml:space="preserve">
|
||||
<value>Microsoft Web App Gallery</value>
|
||||
<value>Web App Gallery</value>
|
||||
</data>
|
||||
<data name="Error.GALLERY_APP_DOWNLOAD_FAILED" xml:space="preserve">
|
||||
<value>We apologize for the inconvenience but the application download has been failed. Please contact your service provider to correct the issue.</value>
|
||||
|
|
|
@ -0,0 +1,186 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="btnCancel.Text" xml:space="preserve">
|
||||
<value>Cancel</value>
|
||||
</data>
|
||||
<data name="cmdContinue.Text" xml:space="preserve">
|
||||
<value>Continue</value>
|
||||
</data>
|
||||
<data name="cmdPause.Text" xml:space="preserve">
|
||||
<value>Pause</value>
|
||||
</data>
|
||||
<data name="cmdStart.Text" xml:space="preserve">
|
||||
<value>Start</value>
|
||||
</data>
|
||||
<data name="cmdStop.Text" xml:space="preserve">
|
||||
<value>Stop</value>
|
||||
</data>
|
||||
<data name="gvServices.Empty" xml:space="preserve">
|
||||
<value>No Windows Services found.</value>
|
||||
</data>
|
||||
<data name="gvServicesId.Header" xml:space="preserve">
|
||||
<value>Id</value>
|
||||
</data>
|
||||
<data name="gvServicesName.Header" xml:space="preserve">
|
||||
<value>Name</value>
|
||||
</data>
|
||||
<data name="gvServicesStatus.Header" xml:space="preserve">
|
||||
<value>Status</value>
|
||||
</data>
|
||||
<data name="gvWPILogo.Header" xml:space="preserve">
|
||||
<value>Logo</value>
|
||||
</data>
|
||||
<data name="Status.ContinuePending" xml:space="preserve">
|
||||
<value>Continuing</value>
|
||||
</data>
|
||||
<data name="Status.Paused" xml:space="preserve">
|
||||
<value>Paused</value>
|
||||
</data>
|
||||
<data name="Status.PausePending" xml:space="preserve">
|
||||
<value>Pausing</value>
|
||||
</data>
|
||||
<data name="Status.Running" xml:space="preserve">
|
||||
<value>Running</value>
|
||||
</data>
|
||||
<data name="Status.StartPending" xml:space="preserve">
|
||||
<value>Starting</value>
|
||||
</data>
|
||||
<data name="Status.Stopped" xml:space="preserve">
|
||||
<value>Stopped</value>
|
||||
</data>
|
||||
<data name="Status.StopPending" xml:space="preserve">
|
||||
<value>Stopping</value>
|
||||
</data>
|
||||
<data name="btnAdd.Text" xml:space="preserve">
|
||||
<value>Add</value>
|
||||
</data>
|
||||
<data name="btnInstall.Text" xml:space="preserve">
|
||||
<value>Install</value>
|
||||
</data>
|
||||
<data name="gvInstall.Header" xml:space="preserve">
|
||||
<value>Install</value>
|
||||
</data>
|
||||
<data name="btnAccept" xml:space="preserve">
|
||||
<value>Accept</value>
|
||||
</data>
|
||||
<data name="WebPlatformInstallerDeps" xml:space="preserve">
|
||||
<value>Products to be installed</value>
|
||||
</data>
|
||||
</root>
|
|
@ -226,6 +226,12 @@
|
|||
<data name="locDatabaseGroupDescr.Text" xml:space="preserve">
|
||||
<value>Choose your database:</value>
|
||||
</data>
|
||||
<data name="locDatabaseType.Text" xml:space="preserve">
|
||||
<value>Database type</value>
|
||||
</data>
|
||||
<data name="locDatabaseTypeDescr.Text" xml:space="preserve">
|
||||
<value>Choose your database type:</value>
|
||||
</data>
|
||||
<data name="locNewDatabase.Text" xml:space="preserve">
|
||||
<value>Create a new or use an existing database</value>
|
||||
</data>
|
||||
|
|
|
@ -39,6 +39,12 @@ namespace WebsitePanel.Portal
|
|||
return ES.Services.WebApplicationGallery.GetGalleryApplications(packageId, categoryId);
|
||||
}
|
||||
|
||||
public GalleryApplicationsResult GetGalleryApplicationsFiltered(string pattern, int packageId)
|
||||
{
|
||||
return ES.Services.WebApplicationGallery.GetGalleryApplicationsFiltered(packageId, pattern);
|
||||
}
|
||||
|
||||
|
||||
public List<GalleryApplication> GetGalleryApplicationsByServiceId(int serviceId)
|
||||
{
|
||||
GalleryApplicationsResult result = ES.Services.WebApplicationGallery.GetGalleryApplicationsByServiceId(serviceId);
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
<%@ Register Src="../UserControls/EditDomainsList.ascx" TagName="EditDomainsList" TagPrefix="uc5" %>
|
||||
<%@ Register Src="../UserControls/CollapsiblePanel.ascx" TagPrefix="wsp" TagName="CollapsiblePanel" %>
|
||||
<%@ Register Src="../UserControls/PopupHeader.ascx" TagName="PopupHeader" TagPrefix="wsp" %>
|
||||
<%@ Register src="../UserControls/EditFeedsList.ascx" tagname="EditFeedsList" tagprefix="uc6" %>
|
||||
<%@ Import Namespace="WebsitePanel.Portal.ProviderControls" %>
|
||||
|
||||
<fieldset>
|
||||
|
@ -175,25 +176,36 @@
|
|||
<asp:Label ID="lblWebAppGallery" runat="server" meta:resourcekey="lblWebAppGallery" Text="Pools" CssClass="NormalBold"></asp:Label>
|
||||
</legend>
|
||||
<br />
|
||||
|
||||
|
||||
<table width="100%" cellpadding="4">
|
||||
<tr>
|
||||
<td class="Normal" valign="top" width="192">
|
||||
<asp:Label ID="lblGalleryFeed" runat="server" meta:resourcekey="lblGalleryFeed" Text="Gallery feed URL:"></asp:Label>
|
||||
</td>
|
||||
<td class="Normal" valign="top">
|
||||
<asp:TextBox ID="txtGalleryFeedUrl" runat="server" CssClass="NormalTextBox" Width="300px"></asp:TextBox>
|
||||
<p style="text-align: justify;"><i><asp:Localize runat="server" meta:resourcekey="lclGalleryFeedNote" /></i></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td class="Normal" valign="top" width="192">
|
||||
<asp:Label runat="server" meta:resourcekey="GalleryFeedFilter" Text="Gallery feed filter:"></asp:Label>
|
||||
</td>
|
||||
|
||||
|
||||
<td class="Normal" valign="top">
|
||||
<asp:LinkButton runat="server" ID="FilterDialogButton" meta:resourcekey="FilterDialogButton" Text="Click to apply a filter..." />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="SubHead" style="width:200px;">Enable Microsoft feed</td>
|
||||
<td class="Normal">
|
||||
<asp:CheckBox ID="wpiMicrosoftFeed" runat="server" Text="Yes" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="SubHead" style="width:200px;">Enable HeliconTech feed</td>
|
||||
<td class="Normal">
|
||||
<asp:CheckBox ID="wpiHeliconTechFeed" runat="server" Text="Yes" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<uc6:EditFeedsList ID="wpiEditFeedsList" runat="server" DisplayNames="false" />
|
||||
</fieldset>
|
||||
<br />
|
||||
|
||||
|
|
|
@ -127,7 +127,13 @@ namespace WebsitePanel.Portal.ProviderControls
|
|||
// ASP.NET 2.0 & 4.0 Bitness Mode
|
||||
Utils.SelectListItem(AspNetBitnessMode, settings[AspNetBitnessMode.ID]);
|
||||
|
||||
txtGalleryFeedUrl.Text = settings["GalleryXmlFeedUrl"];
|
||||
|
||||
|
||||
// WPI
|
||||
wpiMicrosoftFeed.Checked = Utils.ParseBool(settings["FeedEnableMicrosoft"], true);
|
||||
wpiHeliconTechFeed.Checked = Utils.ParseBool(settings["FeedEnableHelicon"], true);
|
||||
wpiEditFeedsList.Value = settings["FeedUrls"];
|
||||
|
||||
|
||||
txtAspPath.Text = settings["AspPath"];
|
||||
php4Path.Text = settings["Php4Path"];
|
||||
|
@ -219,8 +225,6 @@ namespace WebsitePanel.Portal.ProviderControls
|
|||
// ASP.NET 2.0 & 4.0 Bitness Mode
|
||||
settings[AspNetBitnessMode.ID] = AspNetBitnessMode.SelectedValue;
|
||||
|
||||
settings["GalleryXmlFeedUrl"] = txtGalleryFeedUrl.Text.Trim();
|
||||
|
||||
settings["AspPath"] = txtAspPath.Text.Trim();
|
||||
settings["Php4Path"] = php4Path.Text.Trim();
|
||||
settings["PhpPath"] = txtPhpPath.Text.Trim();
|
||||
|
@ -243,7 +247,12 @@ namespace WebsitePanel.Portal.ProviderControls
|
|||
|
||||
ActiveDirectoryIntegration.SaveSettings(settings);
|
||||
|
||||
settings["GalleryAppsFilter"] = GetAppsCatalogFilter();
|
||||
|
||||
|
||||
settings["FeedEnableMicrosoft"] = wpiMicrosoftFeed.Checked.ToString();
|
||||
settings["FeedEnableHelicon"] = wpiHeliconTechFeed.Checked.ToString();
|
||||
settings["FeedUrls"] = wpiEditFeedsList.Value;
|
||||
settings["GalleryAppsFilter"] = GetAppsCatalogFilter();
|
||||
|
||||
if (WDeployEnabledCheckBox.Checked)
|
||||
{
|
||||
|
|
|
@ -1,3 +1,32 @@
|
|||
// 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.
|
||||
//
|
||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// - Neither the name of the Outercurve Foundation nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (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.
|
||||
|
@ -273,24 +302,6 @@ namespace WebsitePanel.Portal.ProviderControls {
|
|||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblWebAppGallery;
|
||||
|
||||
/// <summary>
|
||||
/// lblGalleryFeed 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.Label lblGalleryFeed;
|
||||
|
||||
/// <summary>
|
||||
/// txtGalleryFeedUrl 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.TextBox txtGalleryFeedUrl;
|
||||
|
||||
/// <summary>
|
||||
/// FilterDialogButton control.
|
||||
/// </summary>
|
||||
|
@ -300,6 +311,33 @@ namespace WebsitePanel.Portal.ProviderControls {
|
|||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.LinkButton FilterDialogButton;
|
||||
|
||||
/// <summary>
|
||||
/// wpiMicrosoftFeed 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.CheckBox wpiMicrosoftFeed;
|
||||
|
||||
/// <summary>
|
||||
/// wpiHeliconTechFeed 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.CheckBox wpiHeliconTechFeed;
|
||||
|
||||
/// <summary>
|
||||
/// wpiEditFeedsList control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.UserControls.EditFeedsList wpiEditFeedsList;
|
||||
|
||||
/// <summary>
|
||||
/// FilterDialogPanel control.
|
||||
/// </summary>
|
||||
|
|
|
@ -196,6 +196,12 @@
|
|||
meta:resourcekey="lnkEventViewer" Text="Event Viewer"></asp:HyperLink>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="Normal">
|
||||
<asp:HyperLink ID="lnkPlatformInstaller" runat="server"
|
||||
meta:resourcekey="lnkPlatformInstaller" Text="Web Platform Installer"></asp:HyperLink>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="Normal">
|
||||
<asp:HyperLink ID="lnkServerReboot" runat="server"
|
||||
|
|
|
@ -67,6 +67,7 @@ namespace WebsitePanel.Portal
|
|||
lnkWindowsServices.NavigateUrl = EditUrl("ServerID", PanelRequest.ServerId.ToString(), "edit_winservices");
|
||||
lnkWindowsProcesses.NavigateUrl = EditUrl("ServerID", PanelRequest.ServerId.ToString(), "edit_processes");
|
||||
lnkEventViewer.NavigateUrl = EditUrl("ServerID", PanelRequest.ServerId.ToString(), "edit_eventviewer");
|
||||
lnkPlatformInstaller.NavigateUrl = EditUrl("ServerID", PanelRequest.ServerId.ToString(), "edit_platforminstaller");
|
||||
lnkServerReboot.NavigateUrl = EditUrl("ServerID", PanelRequest.ServerId.ToString(), "edit_reboot");
|
||||
|
||||
lnkBackup.NavigateUrl = EditUrl("ServerID", PanelRequest.ServerId.ToString(), "backup");
|
||||
|
|
|
@ -1,10 +1,38 @@
|
|||
// 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.
|
||||
//
|
||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// - Neither the name of the Outercurve Foundation nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (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.
|
||||
// Runtime Version:2.0.50727.1873
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
@ -400,6 +428,15 @@ namespace WebsitePanel.Portal {
|
|||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.HyperLink lnkEventViewer;
|
||||
|
||||
/// <summary>
|
||||
/// lnkPlatformInstaller 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.HyperLink lnkPlatformInstaller;
|
||||
|
||||
/// <summary>
|
||||
/// lnkServerReboot control.
|
||||
/// </summary>
|
||||
|
|
|
@ -1,21 +1,98 @@
|
|||
// 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.
|
||||
//
|
||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// - Neither the name of the Outercurve Foundation nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (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.
|
||||
// Runtime Version:2.0.50727.42
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebsitePanel.Portal {
|
||||
|
||||
|
||||
public partial class ServersEditSystemProcesses {
|
||||
protected WebsitePanel.Portal.ServerHeaderControl ServerHeaderControl1;
|
||||
protected System.Web.UI.WebControls.Button btnCancel;
|
||||
protected System.Web.UI.UpdateProgress updatePanelProgress;
|
||||
protected System.Web.UI.UpdatePanel ItemsUpdatePanel;
|
||||
protected System.Web.UI.Timer itemsTimer;
|
||||
protected System.Web.UI.WebControls.GridView gvProcesses;
|
||||
|
||||
/// <summary>
|
||||
/// ServerHeaderControl1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.ServerHeaderControl ServerHeaderControl1;
|
||||
|
||||
/// <summary>
|
||||
/// btnCancel 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 btnCancel;
|
||||
|
||||
/// <summary>
|
||||
/// updatePanelProgress control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.UpdateProgress updatePanelProgress;
|
||||
|
||||
/// <summary>
|
||||
/// ItemsUpdatePanel control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.UpdatePanel ItemsUpdatePanel;
|
||||
|
||||
/// <summary>
|
||||
/// itemsTimer control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.Timer itemsTimer;
|
||||
|
||||
/// <summary>
|
||||
/// gvProcesses 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.GridView gvProcesses;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,327 @@
|
|||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ServersEditWebPlatformInstaller.ascx.cs" Inherits="WebsitePanel.Portal.ServersEditWebPlatformInstaller" %>
|
||||
<%@ Import Namespace="WebsitePanel.Portal" %>
|
||||
<%@ Register Src="ServerHeaderControl.ascx" TagName="ServerHeaderControl" TagPrefix="uc1" %>
|
||||
<%@ Register Src="UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
|
||||
<%@ Register Src="UserControls/PopupHeader.ascx" TagName="PopupHeader" TagPrefix="wsp" %>
|
||||
<%@ Register Src="UserControls/EditFeedsList.ascx" TagName="EditFeedsList" TagPrefix="uc6" %>
|
||||
|
||||
<script src="/JavaScript/jquery-1.4.4.min.js" type="text/javascript"></script>
|
||||
|
||||
|
||||
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/>
|
||||
|
||||
|
||||
<uc1:ServerHeaderControl id="ServerHeaderControl1" runat="server">
|
||||
</uc1:ServerHeaderControl>
|
||||
<%--<asp:Button ID="btnSettings" runat="server" Text="Settings"
|
||||
onclick="btnSettings_Click" />
|
||||
<asp:UpdatePanel ID="SettingsPanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
|
||||
|
||||
<ContentTemplate>
|
||||
<uc6:EditFeedsList id="feedsList" runat="server" DisplayNames="false" />
|
||||
|
||||
<asp:Button ID="Button1" runat="server" Text="Save" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
--%>
|
||||
|
||||
<style>
|
||||
ul.WPIKeywordList {
|
||||
padding: 0;
|
||||
}
|
||||
ul.WPIKeywordList>li {
|
||||
padding: .4em .4em;
|
||||
margin-right: .4em;
|
||||
display: inline;
|
||||
list-style-type: none;
|
||||
}
|
||||
ul.WPIKeywordList li .selected
|
||||
{
|
||||
padding: .4em .4em;
|
||||
background-color: #E5F2FF;
|
||||
border: solid 1px #86B9F7;
|
||||
font-weight: bold;
|
||||
}
|
||||
ul.WPIKeywordList input {
|
||||
display: none;
|
||||
}
|
||||
|
||||
ul.WPIKeywordList label {
|
||||
padding: 0 .1em;
|
||||
cursor: pointer;
|
||||
text-decoration: underline;
|
||||
text-decoration-color: #888;
|
||||
}
|
||||
ul.WPIKeywordList li .selected label {
|
||||
text-decoration: none;
|
||||
}
|
||||
.NormalGridView .AspNet-GridView table {
|
||||
border-top: solid 1px #ccc;
|
||||
}
|
||||
.NormalGridView .AspNet-GridView h3 {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.AspNet-GridView-Pagination a,
|
||||
.AspNet-GridView-Pagination span {
|
||||
font-size: 16px !important;
|
||||
padding: 0 3px !important;
|
||||
}
|
||||
|
||||
h2.ProductTitle {
|
||||
cursor: pointer;
|
||||
}
|
||||
.NormalBold {
|
||||
font-size: 125%;
|
||||
}
|
||||
|
||||
.FormFooter {
|
||||
padding: 15px 10px;
|
||||
}
|
||||
|
||||
.FormFooter h2,
|
||||
.FormFooter p {
|
||||
margin: .2em 0;
|
||||
}
|
||||
|
||||
.WpiInstallInfo span,
|
||||
.WpiInstallInfo a {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.ProductsSearchInput {
|
||||
margin: 0;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.ProgressAnimation {
|
||||
margin: .5em 1em .5em 0;
|
||||
}
|
||||
.Failed {
|
||||
color: #c00;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script type="text/javascript">
|
||||
Sys.Application.add_init(function () {
|
||||
$('h2.ProductTitle').live('click', function () {
|
||||
var $cell = $(this).parent();
|
||||
$('.ProductMoreInfo', $cell).show();
|
||||
$('.ProductDescription', $cell).show();
|
||||
$('.ProductSummary', $cell).hide();
|
||||
});
|
||||
$('.ProductsSearchInput').focus();
|
||||
$('.ProductsSearchInput').live("keypress", function (e) {
|
||||
/* ENTER PRESSED*/
|
||||
if (e.keyCode == 13) {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
|
||||
$('.ProductsSearchButton')[0].click();
|
||||
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
<asp:Panel ID="SearchPanel" class="FormBody" runat="server">
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td>
|
||||
<asp:RadioButtonList ID="keywordsList" runat="server"
|
||||
RepeatLayout="UnorderedList" CssClass="WPIKeywordList FormBody"
|
||||
onselectedindexchanged="keywordsList_SelectedIndexChanged"
|
||||
AutoPostBack="True">
|
||||
</asp:RadioButtonList>
|
||||
</td>
|
||||
<td style="width: 190px; vertical-align: middle;">
|
||||
<asp:TextBox ID="searchBox" runat="server" CssClass="NormalTextBox ProductsSearchInput"></asp:TextBox><asp:ImageButton ID="ProductSearchGo" runat="server" SkinID="SearchButton" OnClick="SearchButton_Click" CssClass="ProductsSearchButton"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</asp:Panel>
|
||||
|
||||
<div runat="server" ID="InstallButtons2" class="FormFooter">
|
||||
<asp:Button ID="btnInstall2" Text="Install" runat="server" onclick="btnInstall_Click" CssClass="Button1" />
|
||||
<asp:Button ID="btnCancel2" Text="Cancel" runat="server" onclick="btnCancel_Click" CssClass="Button1" />
|
||||
</div>
|
||||
|
||||
<asp:UpdatePanel ID="ProductsPanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
|
||||
<Triggers>
|
||||
<asp:AsyncPostBackTrigger runat="server" ControlID="BackToGalleryButton" EventName="Click"/>
|
||||
</Triggers>
|
||||
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="gvWpiProducts" runat="server" AutoGenerateColumns="False"
|
||||
EmptyDataText="Products not found"
|
||||
CssSelectorClass="NormalGridView" EnableViewState="true"
|
||||
OnRowCommand="gvWpiProducts_RowCommand"
|
||||
ShowHeader="False"
|
||||
AllowPaging="True" onpageindexchanging="gvWpiProducts_PageIndexChanging"
|
||||
>
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField ItemStyle-Wrap="false" HeaderText="gvWPILogo" ItemStyle-Width="5%" >
|
||||
<ItemTemplate>
|
||||
<asp:Image ID="icoLogo" runat="server" SkinID="Dvd48" src='<%# FixDefaultLogo((string)Eval("Logo")) %>' Width="48" Height="48" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Wrap="true" HeaderText="gvServicesName" ItemStyle-Width="85%">
|
||||
<ItemTemplate>
|
||||
<h2 class="ProductTitle Huge"><%# Eval("Title")%></h2>
|
||||
<p class="ProductSummary"><%# Eval("Summary") %></p>
|
||||
<p style="display: none" class="ProductDescription"><%# Eval("LongDescription")%></p>
|
||||
|
||||
<p>
|
||||
<asp:HyperLink ID="productLink" runat="server" NavigateUrl='<%# Eval("Link")%>' Target="_blank">More information</asp:HyperLink>
|
||||
·
|
||||
<span>Version: <%# Eval("Version")%></span>
|
||||
·
|
||||
<span>Published: <%# ((DateTime)Eval("Published")).ToShortDateString() %></span>
|
||||
</p>
|
||||
<p class="ProductMoreInfo" style="display: none">
|
||||
Publisher: <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# Eval("AuthorUri")%>' Target="_blank"><%# Eval("Author")%></asp:HyperLink>
|
||||
·
|
||||
<asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl='<%# Eval("EulaUrl")%>' Target="_blank">License terms</asp:HyperLink>
|
||||
</p>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Wrap="false" HeaderText="gvInstall" ItemStyle-Width="10%">
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
<ItemTemplate>
|
||||
|
||||
<asp:Label ID="LabelInstalled" runat="server" Text="installed" Visible='<%# Eval("IsInstalled") %>'></asp:Label>
|
||||
|
||||
<asp:Button ID="btnAdd" runat="server"
|
||||
CssClass='Button1'
|
||||
Visible = '<%# !(bool)Eval("IsInstalled") %>'
|
||||
Text = '<%# IsAddedText((string)Eval("ProductID")) %>'
|
||||
CommandArgument='<%# Eval("ProductID") %>'
|
||||
CommandName="WpiAdd"
|
||||
/>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<div runat="server" ID="InstallButtons1" class="FormFooter">
|
||||
<asp:Button ID="btnInstall1" Text="Install" runat="server" onclick="btnInstall_Click" CssClass="Button1" />
|
||||
<asp:Button ID="btnCancel1" Text="Cancel" runat="server" onclick="btnCancel_Click" CssClass="Button1" />
|
||||
</div>
|
||||
|
||||
<asp:Panel ID="NoProductsSelectedPanel" runat="server" Visible="False">
|
||||
<div class="FormBody">
|
||||
<h2>No products selected to install</h2>
|
||||
<br/>
|
||||
</div>
|
||||
<div class="FormFooter">
|
||||
<asp:Button ID="NoProductsBackButton" runat="server" OnClick="NoProductsBackButtonClick" Text="Back to products" CssClass="Button1" />
|
||||
<br/>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
|
||||
<asp:UpdatePanel ID="InstallPanel" runat="server" Visible="False" UpdateMode="Conditional" >
|
||||
<ContentTemplate>
|
||||
<div class="FormBody">
|
||||
<h2 class="NormalBold">Products to be installed</h2>
|
||||
<p>Review the following list of software to be installed and Windows components to be turned on.</p>
|
||||
</div>
|
||||
|
||||
<asp:GridView ID="gvWpiInstall" runat="server" AutoGenerateColumns="False" AllowPaging="false"
|
||||
EmptyDataText="No products selected to install"
|
||||
CssSelectorClass="NormalGridView" EnableViewState="true"
|
||||
onrowdatabound="gvWpiInstall_RowDataBound"
|
||||
ShowHeader="False">
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField ItemStyle-Wrap="true" HeaderText="gvServicesName" ItemStyle-Width="95%" >
|
||||
<ItemTemplate>
|
||||
<h3><%# Eval("Title")%></h3>
|
||||
<p class="WpiInstallInfo">
|
||||
<asp:HyperLink ID="eulaLink" runat="server" NavigateUrl='<%# Eval("EulaUrl")%>' Target="_blank">License Agreement</asp:HyperLink>
|
||||
<asp:HyperLink ID="productLink" runat="server" NavigateUrl='<%# Eval("DownloadedLocation")%>' Target="_blank"><%# Eval("DownloadedLocation")%></asp:HyperLink>
|
||||
<asp:Label ID="downloadSize" runat="server" Text="Download size:"></asp:Label>
|
||||
</p>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<div runat="server" ID="AceptDEclineButtons" Visible="False" class="FormFooter">
|
||||
<p>
|
||||
Warning: During product installation your IIS process might be restarted depending on the package installed,
|
||||
causing all users connected to the control panel to lose their session, requiring them to re-login after completion.
|
||||
Please assure that no other users are processing requests before you start this process as it might cause corruption
|
||||
if they are in the middle of an update.
|
||||
</p>
|
||||
<br/>
|
||||
<p>
|
||||
By clicking "I Accept", you agree to the license terms for the software listed above. If you do not agree
|
||||
to all of the license terms, click "I Decline".
|
||||
</p>
|
||||
<br/>
|
||||
<asp:Button ID="btnAccept" runat="server" CssClass="Button1" Text="I Accept" onclick="btnAccept_Click" />
|
||||
<asp:Button ID="btnDecline" runat="server" CssClass="Button1" Text="I Decline" onclick="btnDecline_Click" />
|
||||
<asp:Button ID="btnCancel3" runat="server" CssClass="Button1" Text="Cancel" onclick="btnCancel_Click" />
|
||||
</div>
|
||||
|
||||
<asp:UpdatePanel ID="ProgressPanel" runat="server" Visible="False" UpdateMode="Conditional" >
|
||||
<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>
|
||||
<br/>
|
||||
<asp:Image runat="server" ID="ProgressAnimation" ImageAlign="AbsMiddle" ImageUrl="" CssClass="ProgressAnimation"></asp:Image>
|
||||
<asp:Label ID="ProgressMessage" runat="server">initializing...</asp:Label>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
<asp:Button ID="CancelInstall" runat="server"
|
||||
OnClick="CacnelInstallButtonClick" CssClass="Button1"
|
||||
OnClientClick="return confirm('Are you sure to cancel installation?')"
|
||||
Text="Cancel installation"></asp:Button>
|
||||
<br/>
|
||||
<br/>
|
||||
</asp:Panel>
|
||||
<asp:Panel ID="InstallCompletedPanel" runat="server" Visible="False">
|
||||
<div class="FormBody">
|
||||
<p><asp:Label ID="LabelInstallationSuccess" runat="server" CssClass="NormalBold">Selected products are successfully installed</asp:Label>
|
||||
<asp:BulletedList ID="InstalledProductsList" runat="server" Visible="False">
|
||||
</asp:BulletedList>
|
||||
</p>
|
||||
<p><asp:Label ID="LabelInstallationFailed" runat="server" Visible="False" CssClass="Failed">Some products installation are failed</asp:Label></p>
|
||||
<br/>
|
||||
<br/>
|
||||
<asp:Button runat="server" ID="ShowLogsButton" Visible="False" OnClick="ShowLogsButton_OnClick" Text="Show installation logs" CssClass="Button1"/>
|
||||
<asp:Panel runat="server" ID="WpiLogsPanel" Visible="False">
|
||||
<pre runat="server" ID="WpiLogsPre" style="word-wrap: break-word;"></pre>
|
||||
</asp:Panel>
|
||||
<br/>
|
||||
<br/>
|
||||
</div>
|
||||
<div class="FormFooter">
|
||||
<asp:Button ID="BackToGalleryButton" runat="server" OnClick="BackToGalleryButtonClick" CssClass="Button1" Text="Back to products"></asp:Button>
|
||||
<asp:Button ID="btnBackToServer" runat="server" OnClick="btnCancel_Click" CssClass="Button1" Text="Back to server profile"></asp:Button>
|
||||
</div>
|
||||
|
||||
</asp:Panel>
|
||||
</ContentTemplate>
|
||||
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
|
@ -0,0 +1,569 @@
|
|||
// 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.
|
||||
//
|
||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// - Neither the name of the Outercurve Foundation nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Data;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.HtmlControls;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.UI.WebControls.WebParts;
|
||||
using WebsitePanel.Server;
|
||||
using WebsitePanel.Providers;
|
||||
|
||||
namespace WebsitePanel.Portal
|
||||
{
|
||||
|
||||
public partial class ServersEditWebPlatformInstaller : WebsitePanelModuleBase
|
||||
{
|
||||
protected const string _wpiLogsDirViewStateKey = "WPI_LOGS_DIR";
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
try
|
||||
{
|
||||
ES.Services.Servers.InitWPIFeeds(PanelRequest.ServerId);
|
||||
}
|
||||
catch
|
||||
{
|
||||
ProductsPanel.Visible = false;
|
||||
keywordsList.Visible = false;
|
||||
SearchPanel.Visible = false;
|
||||
InstallButtons1.Visible = false;
|
||||
InstallButtons2.Visible = false;
|
||||
|
||||
ShowWarningMessage("No products available. Please enable Web Platfrom Installer feeds in System Settings.");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
ProgressAnimation.ImageUrl = PortalUtils.GetThemedImage("indicator_medium.gif");
|
||||
ViewState["SearchResultShown"] = false;
|
||||
BindWpiProducts();
|
||||
|
||||
string message = UpdateProgress();
|
||||
if (!string.IsNullOrEmpty(message))
|
||||
{
|
||||
ShowProgressPanel();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void BindWpiProducts()
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
keywordsList.Items.Clear();
|
||||
List<WPIKeyword> keywords = new List<WPIKeyword>(ES.Services.Servers.GetWPIKeywords(PanelRequest.ServerId));
|
||||
keywords.Add(new WPIKeyword("Show installed", "Show Installed"));
|
||||
keywordsList.DataSource = keywords;
|
||||
keywordsList.DataTextField = "Text";
|
||||
keywordsList.DataValueField = "ID";
|
||||
keywordsList.DataBind();
|
||||
|
||||
if (keywordsList.Items.Count > 0)
|
||||
{
|
||||
keywordsList.Items[0].Attributes["class"] = "selected";
|
||||
}
|
||||
|
||||
gvWpiProducts.DataSource = FilterInstaledProducts(ES.Services.Servers.GetWPIProducts(PanelRequest.ServerId, null, SelectedKeywordValue));
|
||||
gvWpiProducts.DataBind();
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ShowErrorMessage("SERVER_GET_WIN_SERVICES", ex);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
private string SelectedKeywordValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return IsShowInstalledPseudoKeywordSelected ? null : keywordsList.SelectedValue;
|
||||
}
|
||||
}
|
||||
|
||||
private bool IsShowInstalledPseudoKeywordSelected
|
||||
{
|
||||
get { return keywordsList.SelectedIndex == keywordsList.Items.Count - 1; }
|
||||
}
|
||||
|
||||
|
||||
private ArrayList GetProductsToInstallList()
|
||||
{
|
||||
if (ViewState["wpiProductsForInstall"] != null)
|
||||
{
|
||||
return (ArrayList)ViewState["wpiProductsForInstall"];
|
||||
}
|
||||
return new ArrayList();
|
||||
}
|
||||
|
||||
private void SetProductsToInstallList(ArrayList wpiProductsForInstall)
|
||||
{
|
||||
ViewState["wpiProductsForInstall"] = wpiProductsForInstall;
|
||||
}
|
||||
|
||||
private void ShowProductsGrid()
|
||||
{
|
||||
ProductsPanel.Visible = true;
|
||||
keywordsList.Visible = true;
|
||||
SearchPanel.Visible = true;
|
||||
InstallButtons1.Visible = true;
|
||||
InstallButtons2.Visible = true;
|
||||
|
||||
NoProductsSelectedPanel.Visible = false;
|
||||
|
||||
InstallPanel.Visible = false;
|
||||
AceptDEclineButtons.Visible = false;
|
||||
ProgressPanel.Visible = false;
|
||||
ProgressTimer.Enabled = false;
|
||||
InstallCompletedPanel.Visible = false;
|
||||
|
||||
ProductsPanel.Update();
|
||||
InstallPanel.Update();
|
||||
ProgressPanel.Update();
|
||||
}
|
||||
|
||||
private void ShowNoProductsSelectedPanel()
|
||||
{
|
||||
ProductsPanel.Visible = false;
|
||||
keywordsList.Visible = false;
|
||||
SearchPanel.Visible = false;
|
||||
InstallButtons1.Visible = false;
|
||||
InstallButtons2.Visible = false;
|
||||
|
||||
NoProductsSelectedPanel.Visible = true;
|
||||
|
||||
InstallPanel.Visible = false;
|
||||
AceptDEclineButtons.Visible = false;
|
||||
ProgressPanel.Visible = false;
|
||||
ProgressTimer.Enabled = false;
|
||||
InstallCompletedPanel.Visible = false;
|
||||
|
||||
ProductsPanel.Update();
|
||||
InstallPanel.Update();
|
||||
ProgressPanel.Update();
|
||||
}
|
||||
|
||||
private void ShowSelectedProducts()
|
||||
{
|
||||
ProductsPanel.Visible = false;
|
||||
keywordsList.Visible = false;
|
||||
SearchPanel.Visible = false;
|
||||
InstallButtons1.Visible = false;
|
||||
InstallButtons2.Visible = false;
|
||||
ProgressPanel.Visible = false;
|
||||
ProgressTimer.Enabled = false;
|
||||
InstallCompletedPanel.Visible = false;
|
||||
|
||||
InstallPanel.Visible = true;
|
||||
AceptDEclineButtons.Visible = true;
|
||||
|
||||
ProductsPanel.Update();
|
||||
InstallPanel.Update();
|
||||
ProgressPanel.Update();
|
||||
}
|
||||
|
||||
private void ShowProgressPanel()
|
||||
{
|
||||
ProductsPanel.Visible = false;
|
||||
keywordsList.Visible = false;
|
||||
SearchPanel.Visible = false;
|
||||
InstallButtons1.Visible = false;
|
||||
InstallButtons2.Visible = false;
|
||||
InstallPanel.Visible = false;
|
||||
AceptDEclineButtons.Visible = false;
|
||||
InstallCompletedPanel.Visible = false;
|
||||
|
||||
ProgressPanel.Visible = true;
|
||||
ProgressTimer.Enabled = true;
|
||||
|
||||
ProductsPanel.Update();
|
||||
InstallPanel.Update();
|
||||
ProgressPanel.Update();
|
||||
}
|
||||
|
||||
protected void gvWpiProducts_PageIndexChanging(object sender, GridViewPageEventArgs e)
|
||||
{
|
||||
gvWpiProducts.PageIndex = ((System.Web.UI.WebControls.GridViewPageEventArgs)e).NewPageIndex;
|
||||
if ((bool)ViewState["SearchResultShown"])
|
||||
{
|
||||
gvWpiProducts.DataSource = GetWpiProductsFiltered();
|
||||
}
|
||||
else
|
||||
{
|
||||
gvWpiProducts.DataSource = FilterInstaledProducts(ES.Services.Servers.GetWPIProducts(PanelRequest.ServerId, null, SelectedKeywordValue));
|
||||
}
|
||||
gvWpiProducts.DataBind();
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected void gvWpiProducts_RowCommand(object sender, GridViewCommandEventArgs e)
|
||||
{
|
||||
|
||||
if (e.CommandName == "WpiAdd")
|
||||
{
|
||||
((Button)e.CommandSource).Text = "- remove";
|
||||
((Button)e.CommandSource).CommandName = "WpiRemove";
|
||||
|
||||
ArrayList wpiProductsForInstall = GetProductsToInstallList();
|
||||
wpiProductsForInstall.Add(e.CommandArgument.ToString());
|
||||
SetProductsToInstallList(wpiProductsForInstall);
|
||||
|
||||
}
|
||||
|
||||
if (e.CommandName == "WpiRemove")
|
||||
{
|
||||
((Button)e.CommandSource).Text = "+ add";
|
||||
((Button)e.CommandSource).CommandName = "WpiAdd";
|
||||
|
||||
ArrayList wpiProductsForInstall = GetProductsToInstallList();
|
||||
wpiProductsForInstall.Remove(e.CommandArgument.ToString());
|
||||
SetProductsToInstallList(wpiProductsForInstall);
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void UpdateProductsByKeyword()
|
||||
{
|
||||
gvWpiProducts.DataSource = FilterInstaledProducts(
|
||||
ES.Services.Servers.GetWPIProducts(PanelRequest.ServerId, null, SelectedKeywordValue)
|
||||
);
|
||||
gvWpiProducts.DataBind();
|
||||
}
|
||||
|
||||
protected void keywordsList_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
gvWpiProducts.PageIndex = 0;
|
||||
|
||||
keywordsList.SelectedItem.Attributes["class"] = "selected";
|
||||
searchBox.Text = "";
|
||||
|
||||
UpdateProductsByKeyword();
|
||||
}
|
||||
|
||||
protected void btnInstall_Click(object sender, EventArgs e)
|
||||
{
|
||||
string[] productsToInstall = (string[]) GetProductsToInstallList().ToArray(typeof (string));
|
||||
if (null == productsToInstall || productsToInstall.Length == 0)
|
||||
{
|
||||
ShowNoProductsSelectedPanel();
|
||||
}
|
||||
else
|
||||
{
|
||||
// get dependencies and show it
|
||||
gvWpiInstall.DataSource = ES.Services.Servers.GetWPIProductsWithDependencies(PanelRequest.ServerId, productsToInstall);
|
||||
gvWpiInstall.DataBind();
|
||||
ShowSelectedProducts();
|
||||
}
|
||||
}
|
||||
|
||||
protected void btnDecline_Click(object sender, EventArgs e)
|
||||
{
|
||||
ShowProductsGrid();
|
||||
}
|
||||
|
||||
private IAsyncResult WPIInstallationResult;
|
||||
protected void btnAccept_Click(object sender, EventArgs e)
|
||||
{
|
||||
WPIInstallationResult = ES.Services.Servers.BeginInstallWPIProducts(
|
||||
PanelRequest.ServerId,
|
||||
(string[])GetProductsToInstallList().ToArray(typeof(string)),
|
||||
null,
|
||||
null
|
||||
);
|
||||
ShowProgressPanel();
|
||||
UpdateProgress();
|
||||
}
|
||||
|
||||
private string UpdateProgress()
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
string wpiLogsDir = ViewState[_wpiLogsDirViewStateKey] as string;
|
||||
if (string.IsNullOrEmpty(wpiLogsDir))
|
||||
{
|
||||
wpiLogsDir = ES.Services.Servers.WpiGetLogFileDirectory(PanelRequest.ServerId);
|
||||
ViewState[_wpiLogsDirViewStateKey] = wpiLogsDir;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
|
||||
string message = ES.Services.Servers.GetWPIStatus(PanelRequest.ServerId);
|
||||
if (!string.IsNullOrEmpty(message))
|
||||
{
|
||||
ProgressMessage.Text = message.Replace("\n", "<br/>");
|
||||
}
|
||||
else
|
||||
{
|
||||
//ProgressMessage.Text = "please wait...";
|
||||
}
|
||||
|
||||
|
||||
return message;
|
||||
}
|
||||
|
||||
protected void ProgressTimerTick(object sender, EventArgs e)
|
||||
{
|
||||
string message = UpdateProgress();
|
||||
|
||||
if (string.IsNullOrEmpty(message))
|
||||
{
|
||||
ShowInstallCompletedPanel();
|
||||
//ProgressTimer.Enabled = false;
|
||||
}
|
||||
else if (message.IndexOf("failed", StringComparison.OrdinalIgnoreCase) > 0)
|
||||
{
|
||||
// some installation failed
|
||||
ShowInstallFailedPanel();
|
||||
}
|
||||
}
|
||||
|
||||
private void ShowInstallFailedPanel()
|
||||
{
|
||||
ProgressMessagePanel.Visible = true;
|
||||
InstallCompletedPanel.Visible = true;
|
||||
ProgressAnimation.Style["display"] = "none";
|
||||
CancelInstall.Visible = false;
|
||||
|
||||
LabelInstallationFailed.Visible = true;
|
||||
LabelInstallationSuccess.Visible = false;
|
||||
|
||||
ShowLogButton();
|
||||
}
|
||||
|
||||
private void ShowInstallCompletedPanel()
|
||||
{
|
||||
if (!LabelInstallationFailed.Visible)
|
||||
{
|
||||
ProgressMessagePanel.Visible = false;
|
||||
}
|
||||
InstallCompletedPanel.Visible = true;
|
||||
ProgressAnimation.Style["display"] = "none";
|
||||
|
||||
if (!InstalledProductsList.Visible)
|
||||
{
|
||||
string[] productsToInstall = (string[]) GetProductsToInstallList().ToArray(typeof (string));
|
||||
foreach (string product in productsToInstall)
|
||||
{
|
||||
InstalledProductsList.Items.Add(new ListItem(product));
|
||||
}
|
||||
|
||||
InstalledProductsList.Visible = true;
|
||||
}
|
||||
|
||||
ShowLogButton();
|
||||
}
|
||||
|
||||
private void ShowLogButton()
|
||||
{
|
||||
string wpiLogsDir = ViewState[_wpiLogsDirViewStateKey] as string;
|
||||
if (!string.IsNullOrEmpty(wpiLogsDir))
|
||||
{
|
||||
ShowLogsButton.Visible = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected void gvWpiInstall_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
WPIProduct p = (WPIProduct)e.Row.DataItem;
|
||||
if (p != null)
|
||||
{
|
||||
Label labelFileSize = (Label)e.Row.FindControl("downloadSize");
|
||||
if (p.FileSize == 0 )
|
||||
{
|
||||
if (labelFileSize != null)
|
||||
{
|
||||
labelFileSize.Visible = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (labelFileSize != null)
|
||||
{
|
||||
labelFileSize.Text += " " + p.FileSize + " Kb";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (string.IsNullOrEmpty( p.EulaUrl ) )
|
||||
{
|
||||
HyperLink hl = (HyperLink)e.Row.FindControl("eulaLink");
|
||||
if (hl != null)
|
||||
{
|
||||
hl.Visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty( p.DownloadedLocation ) )
|
||||
{
|
||||
Label label = (Label)e.Row.FindControl("labelDownloaded");
|
||||
if (label != null)
|
||||
{
|
||||
label.Visible = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected void BackToGalleryButtonClick(object sender, EventArgs e)
|
||||
{
|
||||
Response.Redirect(EditUrl("ServerID", PanelRequest.ServerId.ToString(), "edit_platforminstaller"));
|
||||
}
|
||||
|
||||
protected void CacnelInstallButtonClick(object sender, EventArgs e)
|
||||
{
|
||||
ES.Services.Servers.CancelInstallWPIProducts(PanelRequest.ServerId);
|
||||
ProgressMessage.Text = "Canceling...";
|
||||
LabelInstallationSuccess.Text = "Installation canceled";
|
||||
}
|
||||
|
||||
protected void NoProductsBackButtonClick(object sender, EventArgs e)
|
||||
{
|
||||
ShowProductsGrid();
|
||||
}
|
||||
|
||||
protected string IsAddedText(string productId)
|
||||
{
|
||||
if ( GetProductsToInstallList().Contains(productId) )
|
||||
{
|
||||
return "- remove";
|
||||
}
|
||||
else
|
||||
{
|
||||
return "+ add";
|
||||
}
|
||||
}
|
||||
|
||||
protected void btnCancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
Response.Redirect(EditUrl("ServerID", PanelRequest.ServerId.ToString(), "edit_server"));
|
||||
}
|
||||
|
||||
protected void SearchButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
keywordsList.ClearSelection();
|
||||
ViewState["SearchResultShown"] = true;
|
||||
gvWpiProducts.PageIndex = 0;
|
||||
gvWpiProducts.DataSource = GetWpiProductsFiltered();
|
||||
gvWpiProducts.DataBind();
|
||||
}
|
||||
|
||||
private WPIProduct[] GetWpiProductsFiltered()
|
||||
{
|
||||
return ES.Services.Servers.GetWPIProductsFiltered(PanelRequest.ServerId, searchBox.Text);
|
||||
}
|
||||
|
||||
protected ArrayList FilterInstaledProducts(WPIProduct[] products)
|
||||
{
|
||||
ViewState["SearchResultShown"] = false;
|
||||
|
||||
ArrayList result = new ArrayList();
|
||||
|
||||
foreach (WPIProduct product in products)
|
||||
{
|
||||
if (product.IsInstalled == IsShowInstalledPseudoKeywordSelected)
|
||||
{
|
||||
result.Add(product);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
protected string FixDefaultLogo(string imgUrl)
|
||||
{
|
||||
if (string.IsNullOrEmpty(imgUrl))
|
||||
{
|
||||
return GetThemedImage("../icons/dvd_disc_48.png");
|
||||
}
|
||||
|
||||
return imgUrl;
|
||||
}
|
||||
|
||||
protected void ShowLogsButton_OnClick(object sender, EventArgs e)
|
||||
{
|
||||
//show logs
|
||||
try
|
||||
{
|
||||
string wpiLogsDir = ViewState[_wpiLogsDirViewStateKey] as string;
|
||||
|
||||
if (!string.IsNullOrEmpty(wpiLogsDir))
|
||||
{
|
||||
//Get logs !!!
|
||||
object[] logsEntrys = ES.Services.Servers.WpiGetLogsInDirectory(PanelRequest.ServerId, wpiLogsDir);
|
||||
|
||||
WpiLogsPanel.Visible = true;
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
foreach (SettingPair entry in logsEntrys)
|
||||
{
|
||||
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)
|
||||
{
|
||||
WpiLogsPanel.Visible = true;
|
||||
WpiLogsPre.InnerText = ex.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,377 @@
|
|||
// 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.
|
||||
//
|
||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// - Neither the name of the Outercurve Foundation nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (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.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebsitePanel.Portal {
|
||||
|
||||
|
||||
public partial class ServersEditWebPlatformInstaller {
|
||||
|
||||
/// <summary>
|
||||
/// asyncTasks control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks;
|
||||
|
||||
/// <summary>
|
||||
/// ServerHeaderControl1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.ServerHeaderControl ServerHeaderControl1;
|
||||
|
||||
/// <summary>
|
||||
/// SearchPanel 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 SearchPanel;
|
||||
|
||||
/// <summary>
|
||||
/// keywordsList 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.RadioButtonList keywordsList;
|
||||
|
||||
/// <summary>
|
||||
/// searchBox 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.TextBox searchBox;
|
||||
|
||||
/// <summary>
|
||||
/// ProductSearchGo 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.ImageButton ProductSearchGo;
|
||||
|
||||
/// <summary>
|
||||
/// InstallButtons2 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlGenericControl InstallButtons2;
|
||||
|
||||
/// <summary>
|
||||
/// btnInstall2 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 btnInstall2;
|
||||
|
||||
/// <summary>
|
||||
/// btnCancel2 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 btnCancel2;
|
||||
|
||||
/// <summary>
|
||||
/// ProductsPanel control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.UpdatePanel ProductsPanel;
|
||||
|
||||
/// <summary>
|
||||
/// gvWpiProducts 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.GridView gvWpiProducts;
|
||||
|
||||
/// <summary>
|
||||
/// InstallButtons1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlGenericControl InstallButtons1;
|
||||
|
||||
/// <summary>
|
||||
/// btnInstall1 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 btnInstall1;
|
||||
|
||||
/// <summary>
|
||||
/// btnCancel1 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 btnCancel1;
|
||||
|
||||
/// <summary>
|
||||
/// NoProductsSelectedPanel 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 NoProductsSelectedPanel;
|
||||
|
||||
/// <summary>
|
||||
/// NoProductsBackButton 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 NoProductsBackButton;
|
||||
|
||||
/// <summary>
|
||||
/// InstallPanel control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.UpdatePanel InstallPanel;
|
||||
|
||||
/// <summary>
|
||||
/// gvWpiInstall 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.GridView gvWpiInstall;
|
||||
|
||||
/// <summary>
|
||||
/// AceptDEclineButtons control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlGenericControl AceptDEclineButtons;
|
||||
|
||||
/// <summary>
|
||||
/// btnAccept 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 btnAccept;
|
||||
|
||||
/// <summary>
|
||||
/// btnDecline 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 btnDecline;
|
||||
|
||||
/// <summary>
|
||||
/// btnCancel3 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 btnCancel3;
|
||||
|
||||
/// <summary>
|
||||
/// ProgressPanel control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.UpdatePanel ProgressPanel;
|
||||
|
||||
/// <summary>
|
||||
/// ProgressTimer control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.Timer ProgressTimer;
|
||||
|
||||
/// <summary>
|
||||
/// ProgressMessagePanel 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 ProgressMessagePanel;
|
||||
|
||||
/// <summary>
|
||||
/// ProgressAnimation 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.Image ProgressAnimation;
|
||||
|
||||
/// <summary>
|
||||
/// ProgressMessage 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.Label ProgressMessage;
|
||||
|
||||
/// <summary>
|
||||
/// CancelInstall 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 CancelInstall;
|
||||
|
||||
/// <summary>
|
||||
/// InstallCompletedPanel 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 InstallCompletedPanel;
|
||||
|
||||
/// <summary>
|
||||
/// LabelInstallationSuccess 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.Label LabelInstallationSuccess;
|
||||
|
||||
/// <summary>
|
||||
/// InstalledProductsList 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.BulletedList InstalledProductsList;
|
||||
|
||||
/// <summary>
|
||||
/// LabelInstallationFailed 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.Label LabelInstallationFailed;
|
||||
|
||||
/// <summary>
|
||||
/// ShowLogsButton 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 ShowLogsButton;
|
||||
|
||||
/// <summary>
|
||||
/// WpiLogsPanel 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 WpiLogsPanel;
|
||||
|
||||
/// <summary>
|
||||
/// WpiLogsPre control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlGenericControl WpiLogsPre;
|
||||
|
||||
/// <summary>
|
||||
/// BackToGalleryButton 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 BackToGalleryButton;
|
||||
|
||||
/// <summary>
|
||||
/// btnBackToServer 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 btnBackToServer;
|
||||
}
|
||||
}
|
|
@ -1,21 +1,98 @@
|
|||
// 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.
|
||||
//
|
||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// - Neither the name of the Outercurve Foundation nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (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.
|
||||
// Runtime Version:2.0.50727.42
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebsitePanel.Portal {
|
||||
|
||||
|
||||
public partial class ServersEditWindowsServices {
|
||||
protected WebsitePanel.Portal.ServerHeaderControl ServerHeaderControl1;
|
||||
protected System.Web.UI.WebControls.Button btnCancel;
|
||||
protected System.Web.UI.UpdateProgress updatePanelProgress;
|
||||
protected System.Web.UI.UpdatePanel ItemsUpdatePanel;
|
||||
protected System.Web.UI.Timer itemsTimer;
|
||||
protected System.Web.UI.WebControls.GridView gvServices;
|
||||
|
||||
/// <summary>
|
||||
/// ServerHeaderControl1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.ServerHeaderControl ServerHeaderControl1;
|
||||
|
||||
/// <summary>
|
||||
/// btnCancel 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 btnCancel;
|
||||
|
||||
/// <summary>
|
||||
/// updatePanelProgress control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.UpdateProgress updatePanelProgress;
|
||||
|
||||
/// <summary>
|
||||
/// ItemsUpdatePanel control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.UpdatePanel ItemsUpdatePanel;
|
||||
|
||||
/// <summary>
|
||||
/// itemsTimer control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.Timer itemsTimer;
|
||||
|
||||
/// <summary>
|
||||
/// gvServices 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.GridView gvServices;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SystemSettings.ascx.cs" Inherits="WebsitePanel.Portal.SystemSettings" %>
|
||||
<%@ Register TagPrefix="wsp" TagName="CollapsiblePanel" Src="UserControls/CollapsiblePanel.ascx" %>
|
||||
<%@ Register src="UserControls/EditFeedsList.ascx" tagname="EditFeedsList" tagprefix="uc1" %>
|
||||
<div class="FormBody">
|
||||
<wsp:CollapsiblePanel id="lclSmtpSettings" runat="server"
|
||||
TargetControlID="SmtpPanel" meta:resourcekey="lclSmtpSettings" Text="SMTP Server"/>
|
||||
|
@ -39,6 +40,30 @@
|
|||
</tr>
|
||||
</table>
|
||||
</asp:Panel>
|
||||
|
||||
<wsp:CollapsiblePanel id="lclWpiSettings" runat="server"
|
||||
TargetControlID="WpiPanel" meta:resourcekey="lclWpiSettings" Text="WebPlatformInstaller Settings"/>
|
||||
<asp:Panel ID="WpiPanel" runat="server" Height="0" style="overflow:hidden;">
|
||||
<table>
|
||||
<tr>
|
||||
<td class="SubHead" style="width:200px;">Enable Microsoft feed</td>
|
||||
<td class="Normal">
|
||||
<asp:CheckBox ID="wpiMicrosoftFeed" runat="server" Text="Yes" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="SubHead" style="width:200px;">Enable HeliconTech feed</td>
|
||||
<td class="Normal">
|
||||
<asp:CheckBox ID="wpiHeliconTechFeed" runat="server" Text="Yes" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</table>
|
||||
|
||||
<uc1:EditFeedsList ID="wpiEditFeedsList" runat="server" DisplayNames="false" />
|
||||
</asp:Panel>
|
||||
</div>
|
||||
<div class="FormFooter">
|
||||
<asp:Button runat="server" ID="btnSaveSettings" meta:resourcekey="btnSaveSettings"
|
||||
|
|
|
@ -51,6 +51,10 @@ namespace WebsitePanel.Portal
|
|||
|
||||
public const string BACKUPS_PATH = "BackupsPath";
|
||||
|
||||
public const string FEED_ULS = "FeedUrls";
|
||||
public const string FEED_ENABLE_MICROSOFT = "FeedEnableMicrosoft";
|
||||
public const string FEED_ENABLE_HELICON = "FeedEnableHelicon";
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
|
@ -88,6 +92,26 @@ namespace WebsitePanel.Portal
|
|||
{
|
||||
txtBackupsPath.Text = settings["BackupsPath"];
|
||||
}
|
||||
|
||||
|
||||
// WPI
|
||||
settings = ES.Services.System.GetSystemSettings(
|
||||
WSP.SystemSettings.WPI_SETTINGS);
|
||||
|
||||
if (settings != null)
|
||||
{
|
||||
wpiMicrosoftFeed.Checked = Utils.ParseBool(settings[FEED_ENABLE_MICROSOFT],true);
|
||||
wpiHeliconTechFeed.Checked = Utils.ParseBool(settings[FEED_ENABLE_HELICON],true);
|
||||
wpiEditFeedsList.Value = settings[FEED_ULS];
|
||||
}
|
||||
else
|
||||
{
|
||||
wpiMicrosoftFeed.Checked = true;
|
||||
wpiHeliconTechFeed.Checked = true;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void SaveSettings()
|
||||
|
@ -117,7 +141,6 @@ namespace WebsitePanel.Portal
|
|||
settings = new WSP.SystemSettings();
|
||||
settings[BACKUPS_PATH] = txtBackupsPath.Text.Trim();
|
||||
|
||||
// BACKUP
|
||||
result = ES.Services.System.SetSystemSettings(
|
||||
WSP.SystemSettings.BACKUP_SETTINGS, settings);
|
||||
|
||||
|
@ -126,6 +149,23 @@ namespace WebsitePanel.Portal
|
|||
ShowResultMessage(result);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// WPI
|
||||
settings[FEED_ULS] = wpiEditFeedsList.Value;
|
||||
settings[FEED_ENABLE_MICROSOFT] = wpiMicrosoftFeed.Checked.ToString();
|
||||
settings[FEED_ENABLE_HELICON] = wpiHeliconTechFeed.Checked.ToString();
|
||||
|
||||
|
||||
result = ES.Services.System.SetSystemSettings(
|
||||
WSP.SystemSettings.WPI_SETTINGS, settings);
|
||||
|
||||
if (result < 0)
|
||||
{
|
||||
ShowResultMessage(result);
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
@ -1,28 +1,206 @@
|
|||
// 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.
|
||||
//
|
||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// - Neither the name of the Outercurve Foundation nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (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.
|
||||
// Runtime Version:2.0.50727.42
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebsitePanel.Portal {
|
||||
|
||||
|
||||
public partial class SystemSettings {
|
||||
protected WebsitePanel.Portal.CollapsiblePanel lclSmtpSettings;
|
||||
protected System.Web.UI.WebControls.Panel SmtpPanel;
|
||||
protected System.Web.UI.WebControls.TextBox txtSmtpServer;
|
||||
protected System.Web.UI.WebControls.TextBox txtSmtpPort;
|
||||
protected System.Web.UI.WebControls.TextBox txtSmtpUser;
|
||||
protected System.Web.UI.WebControls.TextBox txtSmtpPassword;
|
||||
protected System.Web.UI.WebControls.Localize locEnableSsl;
|
||||
protected System.Web.UI.WebControls.CheckBox chkEnableSsl;
|
||||
protected WebsitePanel.Portal.CollapsiblePanel lclBackupSettings;
|
||||
protected System.Web.UI.WebControls.Panel BackupPanel;
|
||||
protected System.Web.UI.WebControls.Localize Localize1;
|
||||
protected System.Web.UI.WebControls.TextBox txtBackupsPath;
|
||||
protected System.Web.UI.WebControls.Button btnSaveSettings;
|
||||
|
||||
/// <summary>
|
||||
/// lclSmtpSettings control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.CollapsiblePanel lclSmtpSettings;
|
||||
|
||||
/// <summary>
|
||||
/// SmtpPanel 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 SmtpPanel;
|
||||
|
||||
/// <summary>
|
||||
/// txtSmtpServer 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.TextBox txtSmtpServer;
|
||||
|
||||
/// <summary>
|
||||
/// txtSmtpPort 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.TextBox txtSmtpPort;
|
||||
|
||||
/// <summary>
|
||||
/// txtSmtpUser 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.TextBox txtSmtpUser;
|
||||
|
||||
/// <summary>
|
||||
/// txtSmtpPassword 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.TextBox txtSmtpPassword;
|
||||
|
||||
/// <summary>
|
||||
/// locEnableSsl 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.Localize locEnableSsl;
|
||||
|
||||
/// <summary>
|
||||
/// chkEnableSsl 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.CheckBox chkEnableSsl;
|
||||
|
||||
/// <summary>
|
||||
/// lclBackupSettings control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.CollapsiblePanel lclBackupSettings;
|
||||
|
||||
/// <summary>
|
||||
/// BackupPanel 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 BackupPanel;
|
||||
|
||||
/// <summary>
|
||||
/// Localize1 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.Localize Localize1;
|
||||
|
||||
/// <summary>
|
||||
/// txtBackupsPath 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.TextBox txtBackupsPath;
|
||||
|
||||
/// <summary>
|
||||
/// lclWpiSettings control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.CollapsiblePanel lclWpiSettings;
|
||||
|
||||
/// <summary>
|
||||
/// WpiPanel 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 WpiPanel;
|
||||
|
||||
/// <summary>
|
||||
/// wpiMicrosoftFeed 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.CheckBox wpiMicrosoftFeed;
|
||||
|
||||
/// <summary>
|
||||
/// wpiHeliconTechFeed 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.CheckBox wpiHeliconTechFeed;
|
||||
|
||||
/// <summary>
|
||||
/// wpiEditFeedsList control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.UserControls.EditFeedsList wpiEditFeedsList;
|
||||
|
||||
/// <summary>
|
||||
/// btnSaveSettings 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 btnSaveSettings;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,141 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="btnAddFeed.Text" xml:space="preserve">
|
||||
<value>Add</value>
|
||||
</data>
|
||||
<data name="cmdDeleteFeed.AlternateText" xml:space="preserve">
|
||||
<value>Delete</value>
|
||||
</data>
|
||||
<data name="cmdDeleteFeed.OnClientClick" xml:space="preserve">
|
||||
<value>return confirm('Delete item?');</value>
|
||||
</data>
|
||||
<data name="gvFeeds.Empty" xml:space="preserve">
|
||||
<value>The list is empty.</value>
|
||||
</data>
|
||||
<data name="Item.Text" xml:space="preserve">
|
||||
<value>Additional Name Server:</value>
|
||||
</data>
|
||||
<data name="Item0.Text" xml:space="preserve">
|
||||
<value>Primary Name Server:</value>
|
||||
</data>
|
||||
<data name="Item1.Text" xml:space="preserve">
|
||||
<value>Secondary Name Server:</value>
|
||||
</data>
|
||||
</root>
|
|
@ -0,0 +1,184 @@
|
|||
// 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.
|
||||
//
|
||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// - Neither the name of the Outercurve Foundation nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
|
||||
namespace WebsitePanel.Portal.UserControls
|
||||
{
|
||||
public abstract class DomainListControlBase : WebsitePanelControlBase
|
||||
{
|
||||
# region Properties
|
||||
|
||||
protected abstract Button AddButton { get; }
|
||||
protected abstract GridView Grid { get; }
|
||||
|
||||
public Boolean DisplayNames
|
||||
{
|
||||
get { return Grid.Columns[ 0 ].Visible; }
|
||||
set { Grid.Columns[ 0 ].Visible = value; }
|
||||
}
|
||||
|
||||
|
||||
public String Value
|
||||
{
|
||||
get
|
||||
{
|
||||
var items = CollectFormData( false );
|
||||
return String.Join( ";", items.ToArray() );
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
var items = new List<String>();
|
||||
if ( !String.IsNullOrEmpty( value ) )
|
||||
{
|
||||
var parts = value.Split( ';' );
|
||||
items.AddRange( from part in parts where part.Trim() != "" select part.Trim() );
|
||||
}
|
||||
|
||||
// save items
|
||||
_loaded_items = items.ToArray();
|
||||
|
||||
if ( IsPostBack )
|
||||
{
|
||||
BindItems( _loaded_items );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# endregion
|
||||
|
||||
|
||||
protected void Page_Load( Object sender, EventArgs e )
|
||||
{
|
||||
if ( !IsPostBack )
|
||||
{
|
||||
BindItems( _loaded_items ); // empty list
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void BindItems( IEnumerable items )
|
||||
{
|
||||
Grid.DataSource = items;
|
||||
Grid.DataBind();
|
||||
}
|
||||
|
||||
|
||||
public List<String> CollectFormData( Boolean include_empty )
|
||||
{
|
||||
var items = new List<String>();
|
||||
foreach ( GridViewRow row in Grid.Rows )
|
||||
{
|
||||
var txt_name = (TextBox)row.FindControl( _txt_control_name );
|
||||
var val = txt_name.Text.Trim();
|
||||
|
||||
if ( include_empty || "" != val )
|
||||
{
|
||||
items.Add( val );
|
||||
}
|
||||
}
|
||||
|
||||
return items;
|
||||
}
|
||||
|
||||
|
||||
# region Events
|
||||
|
||||
protected void BtnAddClick( Object sender, EventArgs e)
|
||||
{
|
||||
var items = CollectFormData( true );
|
||||
|
||||
// add empty string
|
||||
items.Add( "" );
|
||||
|
||||
// bind items
|
||||
BindItems( items.ToArray() );
|
||||
}
|
||||
|
||||
|
||||
protected void ListRowCommand( Object sender, GridViewCommandEventArgs e )
|
||||
{
|
||||
if ( "delete_item" != e.CommandName )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var items = CollectFormData(true);
|
||||
|
||||
// remove error
|
||||
items.RemoveAt( Utils.ParseInt( e.CommandArgument, 0 ) );
|
||||
|
||||
// bind items
|
||||
BindItems(items.ToArray());
|
||||
}
|
||||
|
||||
|
||||
protected void ListRowDataBound( Object sender, GridViewRowEventArgs e )
|
||||
{
|
||||
var lbl_name = (Label)e.Row.FindControl( _lbl_control_name );
|
||||
var txt_name = (TextBox)e.Row.FindControl( _txt_control_name );
|
||||
var cmd_delete = (ImageButton)e.Row.FindControl( _delete_control_name );
|
||||
|
||||
if ( null == lbl_name )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var val = (String)e.Row.DataItem;
|
||||
txt_name.Text = val;
|
||||
|
||||
var pos = ( e.Row.RowIndex < 2 )
|
||||
? e.Row.RowIndex.ToString( CultureInfo.InvariantCulture )
|
||||
: "";
|
||||
lbl_name.Text = GetLocalizedString( "Item" + pos + ".Text" );
|
||||
|
||||
cmd_delete.CommandArgument = e.Row.RowIndex.ToString( CultureInfo.InvariantCulture );
|
||||
}
|
||||
|
||||
# endregion
|
||||
|
||||
|
||||
# region Fields
|
||||
|
||||
protected String[] _loaded_items = new String[] {};
|
||||
|
||||
protected String _txt_control_name;
|
||||
protected String _lbl_control_name;
|
||||
protected String _delete_control_name;
|
||||
|
||||
# endregion
|
||||
}
|
||||
}
|
|
@ -2,12 +2,12 @@
|
|||
<div style="width:400px;">
|
||||
<div class="FormButtonsBar">
|
||||
<asp:Button id="btnAddDomain" runat="server" meta:resourcekey="btnAddDomain" Text="Add"
|
||||
CssClass="Button2" CausesValidation="false" OnClick="btnAddDomain_Click"/>
|
||||
CssClass="Button2" CausesValidation="false" OnClick="BtnAddClick"/>
|
||||
</div>
|
||||
|
||||
<asp:GridView id="gvDomains" Runat="server" AutoGenerateColumns="False"
|
||||
CssSelectorClass="NormalGridView"
|
||||
OnRowCommand="gvDomains_RowCommand" OnRowDataBound="gvDomains_RowDataBound"
|
||||
OnRowCommand="ListRowCommand" OnRowDataBound="ListRowDataBound"
|
||||
EmptyDataText="gvDomains" ShowHeader="False">
|
||||
<columns>
|
||||
<asp:TemplateField HeaderText="gvDomainsLabel" ItemStyle-Wrap="false">
|
||||
|
|
|
@ -26,134 +26,29 @@
|
|||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Configuration;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.UI.WebControls.WebParts;
|
||||
using System.Web.UI.HtmlControls;
|
||||
|
||||
namespace WebsitePanel.Portal.UserControls
|
||||
{
|
||||
public partial class EditDomainsList : WebsitePanelControlBase
|
||||
public partial class EditDomainsList : DomainListControlBase
|
||||
{
|
||||
public bool DisplayNames
|
||||
public EditDomainsList()
|
||||
{
|
||||
get { return gvDomains.Columns[0].Visible; }
|
||||
set { gvDomains.Columns[0].Visible = value; }
|
||||
_txt_control_name = "txtDomainName";
|
||||
_lbl_control_name = "lblDomainName";
|
||||
_delete_control_name = "cmdDeleteDomain";
|
||||
}
|
||||
|
||||
public string Value
|
||||
|
||||
protected override Button AddButton
|
||||
{
|
||||
get { return GetDomainsValue(); }
|
||||
set { SetDomainsValue(value); }
|
||||
get { return btnAddDomain; }
|
||||
}
|
||||
|
||||
private string GetDomainsValue()
|
||||
|
||||
protected override GridView Grid
|
||||
{
|
||||
List<string> items = CollectFormData(false);
|
||||
return String.Join(";", items.ToArray());
|
||||
}
|
||||
|
||||
private void SetDomainsValue(string s)
|
||||
{
|
||||
List<string> items = new List<string>();
|
||||
if (!String.IsNullOrEmpty(s))
|
||||
{
|
||||
string[] parts = s.Split(';');
|
||||
foreach (string part in parts)
|
||||
{
|
||||
if (part.Trim() != "")
|
||||
items.Add(part.Trim());
|
||||
}
|
||||
}
|
||||
|
||||
// save items
|
||||
loadItems = items.ToArray();
|
||||
|
||||
if (IsPostBack)
|
||||
{
|
||||
BindItems(loadItems);
|
||||
}
|
||||
}
|
||||
|
||||
private string[] loadItems = new string[] { };
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
BindItems(loadItems); // empty list
|
||||
}
|
||||
}
|
||||
|
||||
private void BindItems(string[] items)
|
||||
{
|
||||
gvDomains.DataSource = items;
|
||||
gvDomains.DataBind();
|
||||
}
|
||||
|
||||
public List<string> CollectFormData(bool includeEmpty)
|
||||
{
|
||||
List<string> items = new List<string>();
|
||||
foreach (GridViewRow row in gvDomains.Rows)
|
||||
{
|
||||
TextBox txtDomainName = (TextBox)row.FindControl("txtDomainName");
|
||||
string val = txtDomainName.Text.Trim();
|
||||
|
||||
if (includeEmpty || val != "")
|
||||
items.Add(val);
|
||||
}
|
||||
|
||||
return items;
|
||||
}
|
||||
|
||||
protected void btnAddDomain_Click(object sender, EventArgs e)
|
||||
{
|
||||
List<string> items = CollectFormData(true);
|
||||
|
||||
// add empty string
|
||||
items.Add("");
|
||||
|
||||
// bind items
|
||||
BindItems(items.ToArray());
|
||||
}
|
||||
|
||||
protected void gvDomains_RowCommand(object sender, GridViewCommandEventArgs e)
|
||||
{
|
||||
if (e.CommandName == "delete_item")
|
||||
{
|
||||
List<string> items = CollectFormData(true);
|
||||
|
||||
// remove error
|
||||
items.RemoveAt(Utils.ParseInt((string)e.CommandArgument, 0));
|
||||
|
||||
// bind items
|
||||
BindItems(items.ToArray());
|
||||
}
|
||||
}
|
||||
|
||||
protected void gvDomains_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
Label lblDomainName = (Label)e.Row.FindControl("lblDomainName");
|
||||
TextBox txtDomainName = (TextBox)e.Row.FindControl("txtDomainName");
|
||||
ImageButton cmdDeleteDomain = (ImageButton)e.Row.FindControl("cmdDeleteDomain");
|
||||
|
||||
if (lblDomainName != null)
|
||||
{
|
||||
string val = (string)e.Row.DataItem;
|
||||
txtDomainName.Text = val;
|
||||
|
||||
string pos = (e.Row.RowIndex < 2) ? e.Row.RowIndex.ToString() : "";
|
||||
lblDomainName.Text = GetLocalizedString("Item" + pos + ".Text");
|
||||
|
||||
cmdDeleteDomain.CommandArgument = e.Row.RowIndex.ToString();
|
||||
}
|
||||
get { return gvDomains; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,17 +1,62 @@
|
|||
// 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.
|
||||
//
|
||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// - Neither the name of the Outercurve Foundation nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (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.
|
||||
// Runtime Version:2.0.50727.42
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebsitePanel.Portal.UserControls {
|
||||
|
||||
|
||||
public partial class EditDomainsList {
|
||||
protected System.Web.UI.WebControls.Button btnAddDomain;
|
||||
protected System.Web.UI.WebControls.GridView gvDomains;
|
||||
|
||||
/// <summary>
|
||||
/// btnAddDomain 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 btnAddDomain;
|
||||
|
||||
/// <summary>
|
||||
/// gvDomains 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.GridView gvDomains;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="EditFeedsList.ascx.cs" Inherits="WebsitePanel.Portal.UserControls.EditFeedsList" %>
|
||||
<div style="width:100%;">
|
||||
<div class="FormButtonsBar">
|
||||
<asp:Button id="btnAddFeed" runat="server" meta:resourcekey="btnAddFeed" Text="Add"
|
||||
CssClass="Button2" CausesValidation="false" OnClick="BtnAddClick"/>
|
||||
</div>
|
||||
|
||||
<asp:GridView id="gvFeeds" Runat="server" AutoGenerateColumns="False"
|
||||
CssSelectorClass="NormalGridView"
|
||||
OnRowCommand="ListRowCommand" OnRowDataBound="ListRowDataBound"
|
||||
EmptyDataText="gvFeeds" ShowHeader="False">
|
||||
<columns>
|
||||
<asp:TemplateField HeaderText="gvFeedsLabel" ItemStyle-Wrap="false">
|
||||
<itemtemplate>
|
||||
<asp:Label id="lblFeedName" Runat="server"></asp:Label>
|
||||
</itemtemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="gvFeedsName" ItemStyle-Width="100%">
|
||||
<itemtemplate>
|
||||
<asp:TextBox id="txtFeedName" Runat="server" Width="95%" CssClass="NormalTextBox">
|
||||
</asp:TextBox>
|
||||
<asp:RegularExpressionValidator id="valCorrectFeedName" runat="server" CssClass="NormalBold"
|
||||
ValidationExpression="^(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?$"
|
||||
ErrorMessage=" *" ControlToValidate="txtFeedName" Display="Dynamic"></asp:RegularExpressionValidator>
|
||||
</itemtemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<itemtemplate>
|
||||
<asp:ImageButton ID="cmdDeleteFeed" runat="server" SkinID="DeleteSmall"
|
||||
CommandName="delete_item" CausesValidation="false"
|
||||
meta:resourcekey="cmdDeleteFeed"></asp:ImageButton>
|
||||
</itemtemplate>
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
</asp:TemplateField>
|
||||
</columns>
|
||||
</asp:GridView>
|
||||
|
||||
</div>
|
|
@ -0,0 +1,54 @@
|
|||
// 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.
|
||||
//
|
||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// - Neither the name of the Outercurve Foundation nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace WebsitePanel.Portal.UserControls
|
||||
{
|
||||
public partial class EditFeedsList : DomainListControlBase
|
||||
{
|
||||
public EditFeedsList()
|
||||
{
|
||||
_txt_control_name = "txtFeedName";
|
||||
_lbl_control_name = "lblFeedName";
|
||||
_delete_control_name = "cmdDeleteFeed";
|
||||
}
|
||||
|
||||
|
||||
protected override Button AddButton
|
||||
{
|
||||
get { return btnAddFeed; }
|
||||
}
|
||||
|
||||
|
||||
protected override GridView Grid
|
||||
{
|
||||
get { return gvFeeds; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,62 @@
|
|||
// 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.
|
||||
//
|
||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// - Neither the name of the Outercurve Foundation nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (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.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebsitePanel.Portal.UserControls {
|
||||
|
||||
|
||||
public partial class EditFeedsList {
|
||||
|
||||
/// <summary>
|
||||
/// btnAddFeed 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 btnAddFeed;
|
||||
|
||||
/// <summary>
|
||||
/// gvFeeds 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.GridView gvFeeds;
|
||||
}
|
||||
}
|
|
@ -1,15 +1,117 @@
|
|||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="WebApplicationGallery.ascx.cs" Inherits="WebsitePanel.Portal.WebApplicationGallery" %>
|
||||
<%@ Register Src="UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="uc1" %>
|
||||
<%@ Import Namespace="WebsitePanel.Portal" %>
|
||||
<script src="/JavaScript/jquery-1.4.4.min.js" type="text/javascript"></script>
|
||||
|
||||
<style>
|
||||
ul.WPIKeywordList {
|
||||
padding: 10px 0 0 0;
|
||||
}
|
||||
ul.WPIKeywordList>li {
|
||||
padding: .4em .2em;
|
||||
margin-right: .4em;
|
||||
display: inline;
|
||||
list-style-type: none;
|
||||
line-height: 200%;
|
||||
}
|
||||
ul.WPIKeywordList li span,
|
||||
ul.WPIKeywordList li label {
|
||||
padding: .2em;
|
||||
white-space: nowrap;
|
||||
}
|
||||
ul.WPIKeywordList li .selected
|
||||
{
|
||||
/*padding: .4em .4em;*/
|
||||
background-color: #E5F2FF;
|
||||
border: solid 1px #86B9F7;
|
||||
color: #000;
|
||||
}
|
||||
ul.WPIKeywordList input {
|
||||
display: none;
|
||||
}
|
||||
|
||||
ul.WPIKeywordList label {
|
||||
padding: 0 .1em;
|
||||
cursor: pointer;
|
||||
text-decoration: underline;
|
||||
text-decoration-color: #888;
|
||||
}
|
||||
ul.WPIKeywordList li .selected label {
|
||||
text-decoration: none;
|
||||
}
|
||||
.ProductsSearchInput {
|
||||
}
|
||||
.LanguagesBox {
|
||||
margin: 10px 0;
|
||||
}
|
||||
.AspNet-GridView-Pagination {
|
||||
font-size: 10pt !important;
|
||||
}
|
||||
</style>
|
||||
<!--[if lt IE 9]>
|
||||
<style>
|
||||
ul.WPIKeywordList input {
|
||||
display: inline;
|
||||
}
|
||||
ul.WPIKeywordList>li {
|
||||
padding: .1em .2em;
|
||||
}
|
||||
</style>
|
||||
<![endif]-->
|
||||
<script type="text/javascript">
|
||||
Sys.Application.add_init(function () {
|
||||
$('.ProductsSearchInput').focus();
|
||||
$('.ProductsSearchInput').live("keypress", function (e) {
|
||||
/* ENTER PRESSED*/
|
||||
if (e.keyCode == 13) {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
|
||||
$('.ProductsSearchButton')[0].click();
|
||||
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<div class="FormButtonsBar">
|
||||
<asp:DropDownList ID="ddlCategory" runat="server" CssClass="NormalTextBox"
|
||||
DataValueField="Id" DataTextField="Name" AutoPostBack="True" OnSelectedIndexChanged="ddlCategory_SelectedIndexChanged">
|
||||
</asp:DropDownList>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td>
|
||||
<asp:RadioButtonList ID="rbsCategory" runat="server"
|
||||
RepeatLayout="UnorderedList"
|
||||
CssClass="WPIKeywordList FormBody"
|
||||
DataValueField="Id"
|
||||
DataTextField="Name"
|
||||
AutoPostBack="True"
|
||||
OnSelectedIndexChanged="CategorySelectedIndexChanged">
|
||||
</asp:RadioButtonList>
|
||||
</td>
|
||||
<td style="width: 190px; vertical-align: middle; text-align: right; padding-top: 10px;">
|
||||
<asp:TextBox ID="searchBox" runat="server"
|
||||
CssClass="NormalTextBox ProductsSearchInput" >
|
||||
</asp:TextBox><asp:ImageButton ID="ProductSearchGo" runat="server" SkinID="SearchButton" OnClick="SearchButton_Click" CssClass="ProductsSearchButton"/>
|
||||
<br/>
|
||||
<asp:DropDownList ID="dropDownLanguages" runat="server"
|
||||
CssClass="LanguagesBox NormalTextBox"
|
||||
onselectedindexchanged="dropDownLanguages_SelectedIndexChanged"
|
||||
AutoPostBack="true">
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<uc1:SimpleMessageBox ID="messageBox" runat="server" />
|
||||
|
||||
<%-- <asp:RadioButtonList ID="keywordsList" runat="server"
|
||||
RepeatLayout="UnorderedList" CssClass="WPIKeywordList FormBody"
|
||||
onselectedindexchanged="keywordsList_SelectedIndexChanged"
|
||||
AutoPostBack="True">
|
||||
</asp:RadioButtonList>--%>
|
||||
|
||||
<asp:GridView id="gvApplications" runat="server" AutoGenerateColumns="False" AllowPaging="true"
|
||||
ShowHeader="false" CssSelectorClass="LightGridView" EmptyDataText="gvApplications" OnRowCommand="gvApplications_RowCommand"
|
||||
OnPageIndexChanging="gvApplications_PageIndexChanging">
|
||||
|
@ -20,7 +122,7 @@
|
|||
<div style="text-align:center;">
|
||||
<asp:hyperlink NavigateUrl='<%# EditUrl("ApplicationID", Eval("Id").ToString(), "edit", "SpaceID=" + PanelSecurity.PackageId.ToString()) %>'
|
||||
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")) %>'
|
||||
AlternateText='<%# Eval("Title") %>'>
|
||||
</asp:Image>
|
||||
|
@ -31,7 +133,7 @@
|
|||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<div class="MediumBold" style="padding:4px;">
|
||||
<asp:hyperlink CssClass=MediumBold NavigateUrl='<%# EditUrl("ApplicationID", Eval("Id").ToString(), "edit", "SpaceID=" + PanelSecurity.PackageId.ToString()) %>'
|
||||
<asp:hyperlink CssClass="MediumBold" NavigateUrl='<%# EditUrl("ApplicationID", Eval("Id").ToString(), "edit", "SpaceID=" + PanelSecurity.PackageId.ToString()) %>'
|
||||
runat="server" ID="lnkAppDetails" ToolTip='<%# Eval("Title") %>'>
|
||||
<%# Eval("Title")%>
|
||||
</asp:hyperlink>
|
||||
|
|
|
@ -47,15 +47,19 @@ namespace WebsitePanel.Portal
|
|||
//
|
||||
if (!result.IsSuccess)
|
||||
{
|
||||
ddlCategory.Visible = false;
|
||||
rbsCategory.Visible = false;
|
||||
messageBox.ShowMessage(result, "WAG_NOT_AVAILABLE", "ModuleWAG");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!IsPostBack)
|
||||
{
|
||||
//
|
||||
SetLanguage();
|
||||
BindLanguages();
|
||||
BindCategories();
|
||||
BindApplications();
|
||||
ViewState["IsSearchResults"] = false;
|
||||
}
|
||||
}
|
||||
catch(Exception ex)
|
||||
|
@ -67,43 +71,69 @@ namespace WebsitePanel.Portal
|
|||
protected void gvApplications_PageIndexChanging(object sender, GridViewPageEventArgs e)
|
||||
{
|
||||
gvApplications.PageIndex = e.NewPageIndex;
|
||||
//
|
||||
BindApplications();
|
||||
if ((bool)ViewState["IsSearchResults"] == false)
|
||||
{
|
||||
// categorized app list
|
||||
BindApplications();
|
||||
if (null != rbsCategory.SelectedItem)
|
||||
{
|
||||
rbsCategory.SelectedItem.Attributes["class"] = "selected";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// search result app list
|
||||
SearchButton_Click(sender, null);
|
||||
}
|
||||
}
|
||||
|
||||
private void BindLanguages()
|
||||
{
|
||||
GalleryLanguagesResult result = ES.Services.WebApplicationGallery.GetGalleryLanguages(PanelSecurity.PackageId);
|
||||
dropDownLanguages.DataSource = result.Value;
|
||||
//dropDownLanguages.SelectedIndex = 0;
|
||||
dropDownLanguages.SelectedValue = (string)Session["WebApplicationGaleryLanguage"];
|
||||
dropDownLanguages.DataTextField = "Value";
|
||||
dropDownLanguages.DataValueField = "Name";
|
||||
dropDownLanguages.DataBind();
|
||||
|
||||
}
|
||||
|
||||
private void BindCategories()
|
||||
{
|
||||
GalleryCategoriesResult result = ES.Services.WebApplicationGallery.GetGalleryCategories(PanelSecurity.PackageId);
|
||||
//
|
||||
ddlCategory.DataSource = result.Value;
|
||||
ddlCategory.DataTextField = "Name";
|
||||
ddlCategory.DataValueField = "Id";
|
||||
ddlCategory.DataBind();
|
||||
rbsCategory.DataSource = result.Value;
|
||||
rbsCategory.DataTextField = "Name";
|
||||
rbsCategory.DataValueField = "Id";
|
||||
rbsCategory.DataBind();
|
||||
|
||||
// add empty
|
||||
ddlCategory.Items.Insert(0, new ListItem(GetLocalizedString("SelectCategory.Text"), ""));
|
||||
ListItem listItem = new ListItem("All", "");
|
||||
listItem.Attributes["class"] = "selected";
|
||||
rbsCategory.Items.Insert(0, listItem);
|
||||
}
|
||||
|
||||
private void BindApplications()
|
||||
{
|
||||
WebAppGalleryHelpers helper = new WebAppGalleryHelpers();
|
||||
ViewState["IsSearchResults"] = false;
|
||||
WebAppGalleryHelpers helper = new WebAppGalleryHelpers();
|
||||
//
|
||||
GalleryApplicationsResult result = helper.GetGalleryApplications(ddlCategory.SelectedValue, PanelSecurity.PackageId);
|
||||
GalleryApplicationsResult result = helper.GetGalleryApplications(rbsCategory.SelectedValue, PanelSecurity.PackageId);
|
||||
//
|
||||
gvApplications.DataSource = result.Value;
|
||||
gvApplications.DataBind();
|
||||
}
|
||||
|
||||
protected void ddlCategory_SelectedIndexChanged(object sender, EventArgs e)
|
||||
protected void CategorySelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
gvApplications.PageIndex = 0;
|
||||
//
|
||||
BindApplications();
|
||||
}
|
||||
ViewState["IsSearchResults"] = false;
|
||||
searchBox.Text = "";
|
||||
gvApplications.PageIndex = 0;
|
||||
rbsCategory.SelectedItem.Attributes["class"] = "selected";
|
||||
|
||||
protected void odsApplications_Selected(object sender, ObjectDataSourceStatusEventArgs e)
|
||||
{
|
||||
}
|
||||
BindApplications();
|
||||
}
|
||||
|
||||
protected void gvApplications_RowCommand(object sender, GridViewCommandEventArgs e)
|
||||
{
|
||||
|
@ -111,5 +141,42 @@ namespace WebsitePanel.Portal
|
|||
Response.Redirect(EditUrl("ApplicationID", e.CommandArgument.ToString(), "edit",
|
||||
"SpaceID=" + PanelSecurity.PackageId.ToString()));
|
||||
}
|
||||
|
||||
protected void SearchButton_Click(object sender, System.Web.UI.ImageClickEventArgs e)
|
||||
{
|
||||
if ((bool)ViewState["IsSearchResults"] == false)
|
||||
{
|
||||
gvApplications.PageIndex = 0;
|
||||
}
|
||||
ViewState["IsSearchResults"] = true;
|
||||
|
||||
WebAppGalleryHelpers helper = new WebAppGalleryHelpers();
|
||||
GalleryApplicationsResult result = helper.GetGalleryApplicationsFiltered(searchBox.Text, PanelSecurity.PackageId);
|
||||
|
||||
gvApplications.DataSource = result.Value ;
|
||||
gvApplications.DataBind();
|
||||
}
|
||||
|
||||
protected void dropDownLanguages_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
Session["WebApplicationGaleryLanguage"] = dropDownLanguages.SelectedValue;
|
||||
|
||||
SetLanguage();
|
||||
|
||||
BindLanguages();
|
||||
BindCategories();
|
||||
BindApplications();
|
||||
|
||||
}
|
||||
|
||||
private void SetLanguage()
|
||||
{
|
||||
string lang = (string)Session["WebApplicationGaleryLanguage"];
|
||||
if (string.IsNullOrEmpty(lang))
|
||||
{
|
||||
lang = "en";
|
||||
}
|
||||
ES.Services.WebApplicationGallery.SetResourceLanguage(PanelSecurity.PackageId, lang);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,4 +1,33 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// 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.
|
||||
//
|
||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// - Neither the name of the Outercurve Foundation nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (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.
|
||||
//
|
||||
|
@ -13,13 +42,40 @@ namespace WebsitePanel.Portal {
|
|||
public partial class WebApplicationGallery {
|
||||
|
||||
/// <summary>
|
||||
/// ddlCategory control.
|
||||
/// rbsCategory 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.DropDownList ddlCategory;
|
||||
protected global::System.Web.UI.WebControls.RadioButtonList rbsCategory;
|
||||
|
||||
/// <summary>
|
||||
/// searchBox 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.TextBox searchBox;
|
||||
|
||||
/// <summary>
|
||||
/// ProductSearchGo 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.ImageButton ProductSearchGo;
|
||||
|
||||
/// <summary>
|
||||
/// dropDownLanguages 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.DropDownList dropDownLanguages;
|
||||
|
||||
/// <summary>
|
||||
/// messageBox control.
|
||||
|
|
|
@ -27,7 +27,8 @@
|
|||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
using System;
|
||||
using WebsitePanel.Providers.WebAppGallery;
|
||||
using System.Globalization;
|
||||
using WebsitePanel.Providers.WebAppGallery;
|
||||
using WebsitePanel.Providers.ResultObjects;
|
||||
|
||||
namespace WebsitePanel.Portal
|
||||
|
@ -39,7 +40,7 @@ namespace WebsitePanel.Portal
|
|||
lblVersion.Text = application.Version;
|
||||
lblDescription.Text = application.Description;
|
||||
lblTitle.Text = application.Title;
|
||||
lblSize.Text = application.Size;
|
||||
lblSize.Text = application.InstallerFileSize.ToString(CultureInfo.InvariantCulture);
|
||||
imgLogo.ImageUrl = "~/DesktopModules/WebsitePanel/resizeimage.ashx?url=" + Server.UrlEncode(application.IconUrl) +
|
||||
"&width=200&height=200";
|
||||
|
||||
|
|
|
@ -63,10 +63,10 @@
|
|||
<%-- database engine --%>
|
||||
<fieldset id="databaseEngineBlock" runat="server">
|
||||
<legend>
|
||||
<asp:Localize ID="locDatabaseGroup" meta:resourcekey="locDatabaseGroup" runat="server"></asp:Localize>
|
||||
<asp:Localize ID="locDatabaseType" meta:resourcekey="locDatabaseType" runat="server"></asp:Localize>
|
||||
</legend>
|
||||
<div class="FormFieldDescription">
|
||||
<asp:Localize ID="locDatabaseGroupDescr" meta:resourcekey="locDatabaseGroupDescr" runat="server"></asp:Localize>
|
||||
<asp:Localize ID="locDatabaseTypeDescr" meta:resourcekey="locDatabaseTypeDescr" runat="server"></asp:Localize>
|
||||
</div>
|
||||
<div class="FormField">
|
||||
<asp:DropDownList ID="databaseEngines" runat="server" AutoPostBack="true" Width="600px"
|
||||
|
@ -106,6 +106,18 @@
|
|||
</asp:Panel>
|
||||
</div>
|
||||
|
||||
<asp:Panel runat="server" ID="InstallLogPanel" Visible="False" CssClass="FormBody">
|
||||
<script type="text/javascript">
|
||||
function showLogPre() {
|
||||
document.getElementById('<%=InstallLog.ClientID%>').style.display = 'block';
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
<asp:Button runat="server" CssClass="Button1" Text="Show Install Log" OnClientClick="return showLogPre();" />
|
||||
<pre runat="server" ID="InstallLog" style="white-space: pre-wrap; display: none;">
|
||||
Logs not found
|
||||
</pre>
|
||||
</asp:Panel>
|
||||
|
||||
<div class="FormFooter">
|
||||
<asp:Button ID="btnInstall" runat="server" meta:resourcekey="btnInstall" Text="Install" ValidationGroup="wag"
|
||||
|
|
|
@ -373,15 +373,28 @@ namespace WebsitePanel.Portal
|
|||
// collect parameters
|
||||
List<DeploymentParameter> parameters = GetParameters();
|
||||
|
||||
string language = (string)Session["WebApplicationGaleryLanguage"];
|
||||
// install application
|
||||
ResultObject res = ES.Services.WebApplicationGallery.Install(PanelSecurity.PackageId,
|
||||
StringResultObject res = ES.Services.WebApplicationGallery.Install(PanelSecurity.PackageId,
|
||||
PanelRequest.ApplicationID,
|
||||
ddlWebSite.SelectedItem.Text,
|
||||
directoryName.Text.Trim(),
|
||||
parameters.ToArray());
|
||||
parameters.ToArray(),
|
||||
language
|
||||
);
|
||||
|
||||
InstallLogPanel.Visible = true;
|
||||
InstallLog.InnerText = res.Value;
|
||||
|
||||
// show message box with results
|
||||
messageBox.ShowMessage(res, "WEB_APPLICATION_GALLERY_INSTALLED", "WebAppGallery");
|
||||
if (res.IsSuccess)
|
||||
{
|
||||
messageBox.ShowMessage(res, "WEB_APPLICATION_GALLERY_INSTALLED", "WebAppGallery");
|
||||
}
|
||||
else
|
||||
{
|
||||
messageBox.ShowMessage(res, null, null);
|
||||
}
|
||||
|
||||
// toggle controls if there are no errors
|
||||
if (res.ErrorCodes.Count == 0)
|
||||
|
|
|
@ -1,4 +1,33 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// 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.
|
||||
//
|
||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// - Neither the name of the Outercurve Foundation nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (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.
|
||||
//
|
||||
|
@ -175,22 +204,22 @@ namespace WebsitePanel.Portal {
|
|||
protected global::System.Web.UI.HtmlControls.HtmlGenericControl databaseEngineBlock;
|
||||
|
||||
/// <summary>
|
||||
/// locDatabaseGroup control.
|
||||
/// locDatabaseType 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.Localize locDatabaseGroup;
|
||||
protected global::System.Web.UI.WebControls.Localize locDatabaseType;
|
||||
|
||||
/// <summary>
|
||||
/// locDatabaseGroupDescr control.
|
||||
/// locDatabaseTypeDescr 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.Localize locDatabaseGroupDescr;
|
||||
protected global::System.Web.UI.WebControls.Localize locDatabaseTypeDescr;
|
||||
|
||||
/// <summary>
|
||||
/// databaseEngines control.
|
||||
|
@ -246,6 +275,24 @@ namespace WebsitePanel.Portal {
|
|||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Repeater repParams;
|
||||
|
||||
/// <summary>
|
||||
/// InstallLogPanel 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 InstallLogPanel;
|
||||
|
||||
/// <summary>
|
||||
/// InstallLog control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlGenericControl InstallLog;
|
||||
|
||||
/// <summary>
|
||||
/// btnInstall control.
|
||||
/// </summary>
|
||||
|
|
|
@ -336,15 +336,32 @@
|
|||
</Compile>
|
||||
<Compile Include="ProviderControls\Lync_Settings.ascx.cs">
|
||||
<DependentUpon>Lync_Settings.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ServersEditWebPlatformInstaller.ascx.cs">
|
||||
<DependentUpon>ServersEditWebPlatformInstaller.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ProviderControls\Lync_Settings.ascx.designer.cs">
|
||||
<DependentUpon>Lync_Settings.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ServersEditWebPlatformInstaller.ascx.designer.cs">
|
||||
<DependentUpon>ServersEditWebPlatformInstaller.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ScheduleTaskControls\NotifyOverusedDatabases.ascx.cs">
|
||||
<DependentUpon>NotifyOverusedDatabases.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UserControls\DomainListControlBase.cs">
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UserControls\EditFeedsList.ascx.cs">
|
||||
<DependentUpon>EditFeedsList.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UserControls\EditFeedsList.ascx.designer.cs">
|
||||
<DependentUpon>EditFeedsList.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="VPSForPC\MonitoringPage.aspx.cs">
|
||||
<DependentUpon>MonitoringPage.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
@ -3759,6 +3776,7 @@
|
|||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="ExchangeServer\ExchangeAddMailboxPlan.ascx" />
|
||||
<Content Include="ServersEditWebPlatformInstaller.ascx" />
|
||||
<Content Include="ExchangeServer\ExchangeMailboxPlans.ascx" />
|
||||
<Content Include="ExchangeServer\UserControls\AccountsListWithPermissions.ascx" />
|
||||
<Content Include="ExchangeServer\UserControls\MailboxPlanSelector.ascx" />
|
||||
|
@ -3779,6 +3797,7 @@
|
|||
<Content Include="ProviderControls\hMailServer5_Settings.ascx" />
|
||||
<Content Include="ProviderControls\Lync_Settings.ascx" />
|
||||
<Content Include="ScheduleTaskControls\NotifyOverusedDatabases.ascx" />
|
||||
<Content Include="UserControls\EditFeedsList.ascx" />
|
||||
<Content Include="VPSForPC\MonitoringPage.aspx" />
|
||||
<Content Include="VPSForPC\VdcAccountVLanAdd.ascx" />
|
||||
<Content Include="VPSForPC\VdcAccountVLanNetwork.ascx" />
|
||||
|
@ -4893,6 +4912,9 @@
|
|||
<Content Include="ProviderControls\App_LocalResources\hMailServer5_EditList.ascx.resx">
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
<Content Include="App_LocalResources\ServersEditWebPlatformInstaller.ascx.resx">
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
<Content Include="ExchangeServer\App_LocalResources\ExchangeAddMailboxPlan.ascx.resx" />
|
||||
<Content Include="ExchangeServer\App_LocalResources\ExchangeMailboxPlans.ascx.resx" />
|
||||
<Content Include="Lync\App_LocalResources\LyncAddFederationDomain.ascx.resx" />
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="C:\Program Files\MSBuild\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets"/>
|
||||
<Import Project="C:\Program Files (x86)\MSBuild\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets"/>
|
||||
<PropertyGroup>
|
||||
<Version>1.2.2.0</Version>
|
||||
<FileVersion>1.2.2.1</FileVersion>
|
||||
|
@ -18,9 +18,9 @@
|
|||
<PreviousBuildFolder>C:\Projects\WebsitePanel-1.2.1\$(BuildConfiguration)</PreviousBuildFolder>
|
||||
|
||||
<DiffCmd>$(TrunkFolder)\Tools\Diff.exe</DiffCmd>
|
||||
<SqlCmd>"C:\Program Files\Microsoft SQL Server\100\Tools\Binn\sqlcmd.exe" -S (local)\SQLEXPRESS -E</SqlCmd>
|
||||
<SqlCmd>"C:\Program Files\Microsoft SQL Server\110\Tools\Binn\sqlcmd.exe" -S (local)\SQLEXPRESS -E</SqlCmd>
|
||||
|
||||
<MSDeployPath>"C:\Program Files\IIS\Microsoft Web Deploy V2\msdeploy.exe"</MSDeployPath>
|
||||
<MSDeployPath>"C:\Program Files (x86)\IIS\Microsoft Web Deploy V2\msdeploy.exe"</MSDeployPath>
|
||||
|
||||
<DataBaseName>WebsitePanel_build</DataBaseName>
|
||||
<MSDeployConnectionString>server=(local)\SQLEXPRESS;database=$(DataBaseName);Integrated Security=true;</MSDeployConnectionString>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue