Added: WebHosting: Moved hostname support enablement to hosting plan to enable
closer compatibility with legacy approach. Default hostname set within webpolicy settings
This commit is contained in:
parent
71875ca55f
commit
b4a760f6ec
24 changed files with 235 additions and 42 deletions
|
@ -5905,3 +5905,12 @@ HAVING (COUNT(DomainName) = 1))
|
||||||
DROP TABLE #TempDomains
|
DROP TABLE #TempDomains
|
||||||
COMMIT TRAN
|
COMMIT TRAN
|
||||||
GO
|
GO
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'Web.EnableHostNameSupport')
|
||||||
|
BEGIN
|
||||||
|
INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (334, 2, 23, N'Web.EnableHostNameSupport', N'Enable Hostname Support', 1, 0, NULL)
|
||||||
|
END
|
||||||
|
GO
|
||||||
|
|
||||||
|
|
|
@ -79,7 +79,8 @@ order by rg.groupOrder
|
||||||
public const string WEB_CFVIRTUALDIRS = "Web.CFVirtualDirectories"; //ColdFusion Virtual Directories
|
public const string WEB_CFVIRTUALDIRS = "Web.CFVirtualDirectories"; //ColdFusion Virtual Directories
|
||||||
public const string WEB_REMOTEMANAGEMENT = "Web.RemoteManagement"; //IIS 7 Remote Management
|
public const string WEB_REMOTEMANAGEMENT = "Web.RemoteManagement"; //IIS 7 Remote Management
|
||||||
public const string WEB_SSL = "Web.SSL"; //SSL
|
public const string WEB_SSL = "Web.SSL"; //SSL
|
||||||
public const string WEB_ALLOWIPADDRESSMODESWITCH = "Web.AllowIPAddressModeSwitch"; //SSL
|
public const string WEB_ALLOWIPADDRESSMODESWITCH = "Web.AllowIPAddressModeSwitch"; //Allow to switch IP Address Mode
|
||||||
|
public const string WEB_ENABLEHOSTNAMESUPPORT = "Web.EnableHostNameSupport"; //Enable to specify hostnames upon site creation
|
||||||
public const string FTP_ACCOUNTS = "FTP.Accounts"; // FTP Accounts
|
public const string FTP_ACCOUNTS = "FTP.Accounts"; // FTP Accounts
|
||||||
public const string MAIL_ACCOUNTS = "Mail.Accounts"; // Mail Accounts
|
public const string MAIL_ACCOUNTS = "Mail.Accounts"; // Mail Accounts
|
||||||
public const string MAIL_FORWARDINGS = "Mail.Forwardings"; // Mail Forwardings
|
public const string MAIL_FORWARDINGS = "Mail.Forwardings"; // Mail Forwardings
|
||||||
|
|
|
@ -9,14 +9,14 @@
|
||||||
<add name="EnterpriseServer" connectionString="server=HSTPROV01;database=WebsitePanelMerge;uid=WebsitePanel;pwd=aj7ep6fyhmw3b5qeth7c;" />
|
<add name="EnterpriseServer" connectionString="server=HSTPROV01;database=WebsitePanelMerge;uid=WebsitePanel;pwd=aj7ep6fyhmw3b5qeth7c;" />
|
||||||
<add name="EnterpriseServer" connectionString="server=HSTWSP01;database=WebsitePanelMerge;uid=WebsitePanel;pwd=pserxfbnlc6hwmdedbp0;" providerName="System.Data.SqlClient" />
|
<add name="EnterpriseServer" connectionString="server=HSTWSP01;database=WebsitePanelMerge;uid=WebsitePanel;pwd=pserxfbnlc6hwmdedbp0;" providerName="System.Data.SqlClient" />
|
||||||
-->
|
-->
|
||||||
<add name="EnterpriseServer" connectionString="server=HSTWSP01;database=WebsitePanelMerge;uid=WebsitePanel;pwd=pserxfbnlc6hwmdedbp0;" providerName="System.Data.SqlClient" />
|
<add name="EnterpriseServer" connectionString="server=HSTPROV01;database=WebsitePanelMerge;uid=WebsitePanel;pwd=aj7ep6fyhmw3b5qeth7c;" />
|
||||||
</connectionStrings>
|
</connectionStrings>
|
||||||
<appSettings>
|
<appSettings>
|
||||||
<!--
|
<!--
|
||||||
<add key="WebsitePanel.CryptoKey" value="3x7eqt7zabc5n5afs6dg" />
|
<add key="WebsitePanel.CryptoKey" value="3x7eqt7zabc5n5afs6dg" />
|
||||||
<add key="WebsitePanel.CryptoKey" value="fr2ym4wn2gmbrj7dz336" />
|
<add key="WebsitePanel.CryptoKey" value="fr2ym4wn2gmbrj7dz336" />
|
||||||
-->
|
-->
|
||||||
<add key="WebsitePanel.CryptoKey" value="fr2ym4wn2gmbrj7dz336" />
|
<add key="WebsitePanel.CryptoKey" value="3x7eqt7zabc5n5afs6dg" />
|
||||||
<add key="WebsitePanel.EncryptionEnabled" value="true" />
|
<add key="WebsitePanel.EncryptionEnabled" value="true" />
|
||||||
<!-- Web Applications -->
|
<!-- Web Applications -->
|
||||||
<add key="WebsitePanel.EnterpriseServer.WebApplicationsPath" value="~/WebApplications" />
|
<add key="WebsitePanel.EnterpriseServer.WebApplicationsPath" value="~/WebApplications" />
|
||||||
|
|
|
@ -4861,6 +4861,9 @@
|
||||||
<data name="Quota.Web.AllowIPAddressModeSwitch" xml:space="preserve">
|
<data name="Quota.Web.AllowIPAddressModeSwitch" xml:space="preserve">
|
||||||
<value>Allow IP Address Mode Switch</value>
|
<value>Allow IP Address Mode Switch</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Quota.Web.EnableHostNameSupport" xml:space="preserve">
|
||||||
|
<value>Enable Hostname Support</value>
|
||||||
|
</data>
|
||||||
<data name="ServiceItemType.ExchangeOrganization" xml:space="preserve">
|
<data name="ServiceItemType.ExchangeOrganization" xml:space="preserve">
|
||||||
<value>Exchange Organization</value>
|
<value>Exchange Organization</value>
|
||||||
</data>
|
</data>
|
||||||
|
|
|
@ -112,10 +112,10 @@
|
||||||
<value>2.0</value>
|
<value>2.0</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<resheader name="reader">
|
<resheader name="reader">
|
||||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<data name="AllowSubDomains.Text" xml:space="preserve">
|
<data name="AllowSubDomains.Text" xml:space="preserve">
|
||||||
<value>Allow customer sub-domains</value>
|
<value>Allow customer sub-domains</value>
|
||||||
|
@ -180,4 +180,7 @@
|
||||||
<data name="SubDomainRequiredValidator.Text" xml:space="preserve">
|
<data name="SubDomainRequiredValidator.Text" xml:space="preserve">
|
||||||
<value>*</value>
|
<value>*</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="lblHostName.Text" xml:space="preserve">
|
||||||
|
<value>Hostname:</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
|
@ -219,6 +219,9 @@
|
||||||
<data name="lblGroupName.Text" xml:space="preserve">
|
<data name="lblGroupName.Text" xml:space="preserve">
|
||||||
<value>Group Name:</value>
|
<value>Group Name:</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="lblHostName.Text" xml:space="preserve">
|
||||||
|
<value>Default Hostname: (Only when hostnames are enabled)</value>
|
||||||
|
</data>
|
||||||
<data name="lblParkingPageContent.Text" xml:space="preserve">
|
<data name="lblParkingPageContent.Text" xml:space="preserve">
|
||||||
<value>Page Content:</value>
|
<value>Page Content:</value>
|
||||||
</data>
|
</data>
|
||||||
|
@ -273,6 +276,9 @@
|
||||||
<data name="secGeneralSettings.Text" xml:space="preserve">
|
<data name="secGeneralSettings.Text" xml:space="preserve">
|
||||||
<value>General Settings</value>
|
<value>General Settings</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="secHostNamePanel.Text" xml:space="preserve">
|
||||||
|
<value>Default Hostname</value>
|
||||||
|
</data>
|
||||||
<data name="secParkingPage.Text" xml:space="preserve">
|
<data name="secParkingPage.Text" xml:space="preserve">
|
||||||
<value>Parking Page</value>
|
<value>Parking Page</value>
|
||||||
</data>
|
</data>
|
||||||
|
|
|
@ -126,4 +126,7 @@
|
||||||
<data name="lblDomainName.Text" xml:space="preserve">
|
<data name="lblDomainName.Text" xml:space="preserve">
|
||||||
<value>Web Site Pointer:</value>
|
<value>Web Site Pointer:</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="lblTheDotInTheMiddle.Text" xml:space="preserve">
|
||||||
|
<value> . </value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
|
@ -144,6 +144,9 @@
|
||||||
<data name="lblIPHelp2.Text" xml:space="preserve">
|
<data name="lblIPHelp2.Text" xml:space="preserve">
|
||||||
<value>Note: A Zone Template is often defined by your host and contains additional Web Site Pointers to create when creating a new Web Site. Static record definitions such as 'www' conflicts when creating an additional Web Site in the same Domain.</value>
|
<value>Note: A Zone Template is often defined by your host and contains additional Web Site Pointers to create when creating a new Web Site. Static record definitions such as 'www' conflicts when creating an additional Web Site in the same Domain.</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="lblTheDotInTheMiddle.Text" xml:space="preserve">
|
||||||
|
<value> . </value>
|
||||||
|
</data>
|
||||||
<data name="rbDedicatedIP.Text" xml:space="preserve">
|
<data name="rbDedicatedIP.Text" xml:space="preserve">
|
||||||
<value>Dedicated</value>
|
<value>Dedicated</value>
|
||||||
</data>
|
</data>
|
||||||
|
|
|
@ -295,5 +295,13 @@ namespace WebsitePanel.Portal
|
||||||
(cntx.Quotas[key].QuotaTypeId != 1 && (cntx.Quotas[key].QuotaAllocatedValue > 0 || cntx.Quotas[key].QuotaAllocatedValue == -1)));
|
(cntx.Quotas[key].QuotaTypeId != 1 && (cntx.Quotas[key].QuotaAllocatedValue > 0 || cntx.Quotas[key].QuotaAllocatedValue == -1)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static bool CheckQouta(string key, HostingPlanContext cntx)
|
||||||
|
{
|
||||||
|
return cntx.Quotas.ContainsKey(key) &&
|
||||||
|
((cntx.Quotas[key].QuotaAllocatedValue == 1 && cntx.Quotas[key].QuotaTypeId == 1) ||
|
||||||
|
(cntx.Quotas[key].QuotaTypeId != 1 && (cntx.Quotas[key].QuotaAllocatedValue > 0 || cntx.Quotas[key].QuotaAllocatedValue == -1)));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,5 +1,6 @@
|
||||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="DomainsAddDomain.ascx.cs" Inherits="WebsitePanel.Portal.DomainsAddDomain" %>
|
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="DomainsAddDomain.ascx.cs" Inherits="WebsitePanel.Portal.DomainsAddDomain" %>
|
||||||
<%@ Register Src="UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
|
<%@ Register Src="UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
|
||||||
|
<%@ Register Src="DomainsSelectDomainControl.ascx" TagName="DomainsSelectDomainControl" TagPrefix="uc1" %>
|
||||||
<%@ Register Src="UserControls/CollapsiblePanel.ascx" TagPrefix="wsp" TagName="CollapsiblePanel" %>
|
<%@ Register Src="UserControls/CollapsiblePanel.ascx" TagPrefix="wsp" TagName="CollapsiblePanel" %>
|
||||||
|
|
||||||
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server" />
|
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server" />
|
||||||
|
@ -35,10 +36,23 @@
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
<asp:Panel id="CreateWebSitePanel" runat="server" style="padding-bottom: 15px;">
|
<asp:Panel id="CreateWebSitePanel" runat="server" style="padding-bottom: 15px;">
|
||||||
<asp:CheckBox ID="CreateWebSite" runat="server" meta:resourcekey="CreateWebSite" Text="Create Web Site" CssClass="Checkbox Bold" Checked="true" /><br />
|
<table>
|
||||||
<div style="padding-left: 20px;">
|
<tr>
|
||||||
<asp:Localize ID="DescribeCreateWebSite" runat="server" meta:resourcekey="DescribeCreateWebSite">Description...</asp:Localize>
|
<td class="Normal" width="40" nowrap rowspan="2"></td>
|
||||||
</div>
|
<td>
|
||||||
|
<asp:CheckBox ID="CreateWebSite" runat="server" meta:resourcekey="CreateWebSite" Text="Create Web Site" CssClass="Checkbox Bold" Checked="true" /><br />
|
||||||
|
<div style="padding-left: 20px;">
|
||||||
|
<asp:Localize ID="DescribeCreateWebSite" runat="server" meta:resourcekey="DescribeCreateWebSite">Description...</asp:Localize>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="SubHead">
|
||||||
|
<asp:Label ID="lblHostName" runat="server" meta:resourcekey="lblHostName" Text="Host name:"></asp:Label>
|
||||||
|
<asp:TextBox ID="txtHostName" runat="server" CssClass="TextBox100" MaxLength="64" Text="www"></asp:TextBox>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
</asp:Panel>
|
</asp:Panel>
|
||||||
|
|
||||||
<asp:Panel id="PointMailDomainPanel" runat="server" style="padding-bottom: 15px;">
|
<asp:Panel id="PointMailDomainPanel" runat="server" style="padding-bottom: 15px;">
|
||||||
|
|
|
@ -41,6 +41,20 @@ namespace WebsitePanel.Portal
|
||||||
{
|
{
|
||||||
// bind controls
|
// bind controls
|
||||||
BindControls();
|
BindControls();
|
||||||
|
|
||||||
|
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
||||||
|
|
||||||
|
if (Utils.CheckQouta(Quotas.WEB_ENABLEHOSTNAMESUPPORT, cntx))
|
||||||
|
{
|
||||||
|
lblHostName.Visible = txtHostName.Visible = true;
|
||||||
|
UserSettings settings = ES.Services.Users.GetUserSettings(PanelSecurity.LoggedUserId, UserSettings.WEB_POLICY);
|
||||||
|
txtHostName.Text = String.IsNullOrEmpty(settings["HostName"]) ? "" : settings["HostName"];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
lblHostName.Visible= txtHostName.Visible = false;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
@ -179,7 +193,7 @@ namespace WebsitePanel.Portal
|
||||||
{
|
{
|
||||||
domainId = ES.Services.Servers.AddDomainWithProvisioning(PanelSecurity.PackageId,
|
domainId = ES.Services.Servers.AddDomainWithProvisioning(PanelSecurity.PackageId,
|
||||||
domainName.ToLower(), type, CreateWebSite.Checked, pointWebSiteId, pointMailDomainId,
|
domainName.ToLower(), type, CreateWebSite.Checked, pointWebSiteId, pointMailDomainId,
|
||||||
EnableDns.Checked, CreateInstantAlias.Checked, AllowSubDomains.Checked, "");
|
EnableDns.Checked, CreateInstantAlias.Checked, AllowSubDomains.Checked, txtHostName.Text);
|
||||||
|
|
||||||
if (domainId < 0)
|
if (domainId < 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,31 +1,3 @@
|
||||||
// Copyright (c) 2012, Outercurve Foundation.
|
|
||||||
// All rights reserved.
|
|
||||||
//
|
|
||||||
// Redistribution and use in source and binary forms, with or without modification,
|
|
||||||
// are permitted provided that the following conditions are met:
|
|
||||||
//
|
|
||||||
// - Redistributions of source code must retain the above copyright notice, this
|
|
||||||
// list of conditions and the following disclaimer.
|
|
||||||
//
|
|
||||||
// - 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>
|
// <auto-generated>
|
||||||
// This code was generated by a tool.
|
// This code was generated by a tool.
|
||||||
|
@ -184,6 +156,24 @@ namespace WebsitePanel.Portal {
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::System.Web.UI.WebControls.Localize DescribeCreateWebSite;
|
protected global::System.Web.UI.WebControls.Localize DescribeCreateWebSite;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// lblHostName 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 lblHostName;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtHostName 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 txtHostName;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// PointMailDomainPanel control.
|
/// PointMailDomainPanel control.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -28,6 +28,19 @@
|
||||||
</table>
|
</table>
|
||||||
</asp:Panel>
|
</asp:Panel>
|
||||||
|
|
||||||
|
<wsp:CollapsiblePanel id="secHostNamePanel" runat="server"
|
||||||
|
TargetControlID="HostNamePanel" meta:resourcekey="secHostNamePanel" Text="Parking Page"/>
|
||||||
|
<asp:Panel ID="HostNamePanel" runat="server" Height="0" style="overflow:hidden;">
|
||||||
|
<table width="100%">
|
||||||
|
<tr>
|
||||||
|
<td class="SubHead" style="width:150px;"><asp:Label ID="lblHostName" runat="server" meta:resourcekey="lblHostName" Text="Page Name:"></asp:Label></td>
|
||||||
|
<td class="Normal">
|
||||||
|
<asp:TextBox ID="txtHostName" runat="server" Width="200" CssClass="NormalTextBox"></asp:TextBox></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</asp:Panel>
|
||||||
|
|
||||||
|
|
||||||
<wsp:CollapsiblePanel runat="server" ID="WebPublishingProfile"
|
<wsp:CollapsiblePanel runat="server" ID="WebPublishingProfile"
|
||||||
meta:resourcekey="WebPublishingProfile" Text="Web Publishing Profile" TargetControlID="WebPublishingProfilePanel" />
|
meta:resourcekey="WebPublishingProfile" Text="Web Publishing Profile" TargetControlID="WebPublishingProfilePanel" />
|
||||||
<asp:Panel runat="server" ID="WebPublishingProfilePanel" Height="0" style="overflow:hidden;">
|
<asp:Panel runat="server" ID="WebPublishingProfilePanel" Height="0" style="overflow:hidden;">
|
||||||
|
|
|
@ -52,6 +52,9 @@ namespace WebsitePanel.Portal
|
||||||
PublishingProfileTextBox.Text = settings["PublishingProfile"];
|
PublishingProfileTextBox.Text = settings["PublishingProfile"];
|
||||||
chkEnableParkingPageTokens.Checked = Utils.ParseBool(settings["EnableParkingPageTokens"], false);
|
chkEnableParkingPageTokens.Checked = Utils.ParseBool(settings["EnableParkingPageTokens"], false);
|
||||||
|
|
||||||
|
// HostName
|
||||||
|
txtHostName.Text = settings["HostName"];
|
||||||
|
|
||||||
// default documents
|
// default documents
|
||||||
if (!String.IsNullOrEmpty(settings["DefaultDocuments"]))
|
if (!String.IsNullOrEmpty(settings["DefaultDocuments"]))
|
||||||
txtDefaultDocs.Text = String.Join("\n", settings["DefaultDocuments"].Split(',', ';'));
|
txtDefaultDocs.Text = String.Join("\n", settings["DefaultDocuments"].Split(',', ';'));
|
||||||
|
@ -105,6 +108,8 @@ namespace WebsitePanel.Portal
|
||||||
settings["PublishingProfile"] = PublishingProfileTextBox.Text;
|
settings["PublishingProfile"] = PublishingProfileTextBox.Text;
|
||||||
settings["EnableParkingPageTokens"] = chkEnableParkingPageTokens.Checked.ToString();
|
settings["EnableParkingPageTokens"] = chkEnableParkingPageTokens.Checked.ToString();
|
||||||
|
|
||||||
|
settings["HostName"] = txtHostName.Text.Trim();
|
||||||
|
|
||||||
// default documents
|
// default documents
|
||||||
settings["DefaultDocuments"] = String.Join(",", Utils.ParseDelimitedString(txtDefaultDocs.Text, '\n', '\r', ';', ',')); ;
|
settings["DefaultDocuments"] = String.Join(",", Utils.ParseDelimitedString(txtDefaultDocs.Text, '\n', '\r', ';', ',')); ;
|
||||||
|
|
||||||
|
|
|
@ -84,6 +84,42 @@ namespace WebsitePanel.Portal {
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::System.Web.UI.WebControls.CheckBox chkEnableParkingPageTokens;
|
protected global::System.Web.UI.WebControls.CheckBox chkEnableParkingPageTokens;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// secHostNamePanel control.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Auto-generated field.
|
||||||
|
/// To modify move field declaration from designer file to code-behind file.
|
||||||
|
/// </remarks>
|
||||||
|
protected global::WebsitePanel.Portal.CollapsiblePanel secHostNamePanel;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// HostNamePanel 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 HostNamePanel;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// lblHostName 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 lblHostName;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtHostName 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 txtHostName;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// WebPublishingProfile control.
|
/// WebPublishingProfile control.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UserCreateSpace.ascx.cs" Inherits="WebsitePanel.Portal.UserCreateSpace" %>
|
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UserCreateSpace.ascx.cs" Inherits="WebsitePanel.Portal.UserCreateSpace" %>
|
||||||
<%@ Register TagPrefix="wsp" TagName="CollapsiblePanel" Src="UserControls/CollapsiblePanel.ascx" %>
|
<%@ Register TagPrefix="wsp" TagName="CollapsiblePanel" Src="UserControls/CollapsiblePanel.ascx" %>
|
||||||
<%@ Register Src="UserControls/UsernameControl.ascx" TagName="UsernameControl" TagPrefix="uc4" %>
|
<%@ Register Src="UserControls/UsernameControl.ascx" TagName="UsernameControl" TagPrefix="uc4" %>
|
||||||
|
<%@ Register Src="DomainsSelectDomainControl.ascx" TagName="DomainsSelectDomainControl" TagPrefix="uc1" %>
|
||||||
<%@ Register Src="UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
|
<%@ Register Src="UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
|
||||||
|
|
||||||
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/>
|
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/>
|
||||||
|
@ -97,6 +98,12 @@
|
||||||
Text="Create Web Site" Checked="True" />
|
Text="Create Web Site" Checked="True" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="SubHead">
|
||||||
|
<asp:Label ID="lblHostName" runat="server" meta:resourcekey="lblHostName" Text="Host name:"></asp:Label>
|
||||||
|
<asp:TextBox ID="txtHostName" runat="server" CssClass="TextBox100" MaxLength="64" ></asp:TextBox>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
|
|
|
@ -44,6 +44,9 @@ namespace WebsitePanel.Portal
|
||||||
ftpAccountName.SetUserPolicy(PanelSecurity.SelectedUserId, UserSettings.FTP_POLICY, "UserNamePolicy");
|
ftpAccountName.SetUserPolicy(PanelSecurity.SelectedUserId, UserSettings.FTP_POLICY, "UserNamePolicy");
|
||||||
BindHostingPlans(PanelSecurity.SelectedUserId);
|
BindHostingPlans(PanelSecurity.SelectedUserId);
|
||||||
BindHostingPlan();
|
BindHostingPlan();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
@ -92,6 +95,17 @@ namespace WebsitePanel.Portal
|
||||||
{
|
{
|
||||||
systemEnabled = cntx.Groups.ContainsKey(ResourceGroups.Os);
|
systemEnabled = cntx.Groups.ContainsKey(ResourceGroups.Os);
|
||||||
webEnabled = cntx.Groups.ContainsKey(ResourceGroups.Web);
|
webEnabled = cntx.Groups.ContainsKey(ResourceGroups.Web);
|
||||||
|
|
||||||
|
if (Utils.CheckQouta(Quotas.WEB_ENABLEHOSTNAMESUPPORT, cntx))
|
||||||
|
{
|
||||||
|
lblHostName.Visible = txtHostName.Visible = true;
|
||||||
|
UserSettings settings = ES.Services.Users.GetUserSettings(PanelSecurity.LoggedUserId, UserSettings.WEB_POLICY);
|
||||||
|
txtHostName.Text = String.IsNullOrEmpty(settings["HostName"]) ? "" : settings["HostName"];
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
lblHostName.Visible = txtHostName.Visible = false;
|
||||||
|
|
||||||
ftpEnabled = cntx.Groups.ContainsKey(ResourceGroups.Ftp);
|
ftpEnabled = cntx.Groups.ContainsKey(ResourceGroups.Ftp);
|
||||||
mailEnabled = cntx.Groups.ContainsKey(ResourceGroups.Mail);
|
mailEnabled = cntx.Groups.ContainsKey(ResourceGroups.Mail);
|
||||||
}
|
}
|
||||||
|
@ -103,6 +117,7 @@ namespace WebsitePanel.Portal
|
||||||
fsWeb.Visible = webEnabled;
|
fsWeb.Visible = webEnabled;
|
||||||
chkCreateWebSite.Checked &= webEnabled;
|
chkCreateWebSite.Checked &= webEnabled;
|
||||||
|
|
||||||
|
|
||||||
fsFtp.Visible = ftpEnabled;
|
fsFtp.Visible = ftpEnabled;
|
||||||
chkCreateFtpAccount.Checked &= ftpEnabled;
|
chkCreateFtpAccount.Checked &= ftpEnabled;
|
||||||
|
|
||||||
|
@ -134,7 +149,7 @@ namespace WebsitePanel.Portal
|
||||||
Utils.ParseInt(ddlStatus.SelectedValue, 0),
|
Utils.ParseInt(ddlStatus.SelectedValue, 0),
|
||||||
chkPackageLetter.Checked,
|
chkPackageLetter.Checked,
|
||||||
chkCreateResources.Checked, domainName, false, chkCreateWebSite.Checked,
|
chkCreateResources.Checked, domainName, false, chkCreateWebSite.Checked,
|
||||||
chkCreateFtpAccount.Checked, ftpAccount, chkCreateMailAccount.Checked, "");
|
chkCreateFtpAccount.Checked, ftpAccount, chkCreateMailAccount.Checked, txtHostName.Text);
|
||||||
|
|
||||||
if (result.Result < 0)
|
if (result.Result < 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -210,6 +210,24 @@ namespace WebsitePanel.Portal {
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::System.Web.UI.WebControls.CheckBox chkCreateWebSite;
|
protected global::System.Web.UI.WebControls.CheckBox chkCreateWebSite;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// lblHostName 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 lblHostName;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtHostName 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 txtHostName;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// fsFtp control.
|
/// fsFtp control.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<asp:Label ID="lblDomainName" runat="server" meta:resourcekey="lblDomainName" Text="Domain name:"></asp:Label>
|
<asp:Label ID="lblDomainName" runat="server" meta:resourcekey="lblDomainName" Text="Domain name:"></asp:Label>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<asp:TextBox ID="txtHostName" runat="server" CssClass="TextBox100" MaxLength="64" Text="www"></asp:TextBox>.<uc1:DomainsSelectDomainControl ID="domainsSelectDomainControl" runat="server" HideWebSites="false" HideDomainPointers="true" HideInstantAlias="true"/>
|
<asp:TextBox ID="txtHostName" runat="server" CssClass="TextBox100" MaxLength="64" Text="www"></asp:TextBox><asp:Label ID="lblTheDotInTheMiddle" runat="server" meta:resourcekey="lblTheDotInTheMiddle" Text=" . "></asp:Label><uc1:DomainsSelectDomainControl ID="domainsSelectDomainControl" runat="server" HideWebSites="false" HideDomainPointers="true" HideInstantAlias="true"/>
|
||||||
<asp:RequiredFieldValidator ID="valRequireHostName" runat="server" meta:resourcekey="valRequireHostName" ControlToValidate="txtHostName"
|
<asp:RequiredFieldValidator ID="valRequireHostName" runat="server" meta:resourcekey="valRequireHostName" ControlToValidate="txtHostName"
|
||||||
ErrorMessage="Enter hostname" ValidationGroup="CreateSite" Display="Dynamic" Text="*" SetFocusOnError="True"></asp:RequiredFieldValidator>
|
ErrorMessage="Enter hostname" ValidationGroup="CreateSite" Display="Dynamic" Text="*" SetFocusOnError="True"></asp:RequiredFieldValidator>
|
||||||
<asp:RegularExpressionValidator ID="valRequireCorrectHostName" runat="server"
|
<asp:RegularExpressionValidator ID="valRequireCorrectHostName" runat="server"
|
||||||
|
|
|
@ -37,6 +37,8 @@ using System.Web.UI.WebControls;
|
||||||
using System.Web.UI.WebControls.WebParts;
|
using System.Web.UI.WebControls.WebParts;
|
||||||
using System.Web.UI.HtmlControls;
|
using System.Web.UI.HtmlControls;
|
||||||
|
|
||||||
|
using WebsitePanel.EnterpriseServer;
|
||||||
|
|
||||||
namespace WebsitePanel.Portal
|
namespace WebsitePanel.Portal
|
||||||
{
|
{
|
||||||
public partial class WebSitesAddPointer : WebsitePanelModuleBase
|
public partial class WebSitesAddPointer : WebsitePanelModuleBase
|
||||||
|
@ -44,6 +46,19 @@ namespace WebsitePanel.Portal
|
||||||
protected void Page_Load(object sender, EventArgs e)
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
domainsSelectDomainControl.PackageId = PanelSecurity.PackageId;
|
domainsSelectDomainControl.PackageId = PanelSecurity.PackageId;
|
||||||
|
|
||||||
|
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
||||||
|
|
||||||
|
if (Utils.CheckQouta(Quotas.WEB_ENABLEHOSTNAMESUPPORT, cntx))
|
||||||
|
{
|
||||||
|
txtHostName.Visible = lblTheDotInTheMiddle.Visible = true;
|
||||||
|
UserSettings settings = ES.Services.Users.GetUserSettings(PanelSecurity.LoggedUserId, UserSettings.WEB_POLICY);
|
||||||
|
txtHostName.Text = String.IsNullOrEmpty(settings["HostName"]) ? "" : settings["HostName"];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
txtHostName.Visible = lblTheDotInTheMiddle.Visible = false;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void AddPointer()
|
private void AddPointer()
|
||||||
|
|
|
@ -30,6 +30,15 @@ namespace WebsitePanel.Portal {
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::System.Web.UI.WebControls.TextBox txtHostName;
|
protected global::System.Web.UI.WebControls.TextBox txtHostName;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// lblTheDotInTheMiddle 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 lblTheDotInTheMiddle;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// domainsSelectDomainControl control.
|
/// domainsSelectDomainControl control.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
<asp:Label ID="lblDomainName" runat="server" meta:resourcekey="lblDomainName" Text="Domain name:"></asp:Label>
|
<asp:Label ID="lblDomainName" runat="server" meta:resourcekey="lblDomainName" Text="Domain name:"></asp:Label>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<asp:TextBox ID="txtHostName" runat="server" CssClass="TextBox100" MaxLength="64" Text="www"></asp:TextBox> . <uc1:DomainsSelectDomainControl ID="domainsSelectDomainControl" runat="server" HideWebSites="false" HideDomainPointers="true" HideInstantAlias="true"/>
|
<asp:TextBox ID="txtHostName" runat="server" CssClass="TextBox100" MaxLength="64" Text="www"></asp:TextBox><asp:Label ID="lblTheDotInTheMiddle" runat="server" meta:resourcekey="lblTheDotInTheMiddle" Text=" . "></asp:Label><uc1:DomainsSelectDomainControl ID="domainsSelectDomainControl" runat="server" HideWebSites="false" HideDomainPointers="true" HideInstantAlias="true"/>
|
||||||
<asp:RequiredFieldValidator ID="valRequireHostName" runat="server" meta:resourcekey="valRequireHostName" ControlToValidate="txtHostName"
|
<asp:RequiredFieldValidator ID="valRequireHostName" runat="server" meta:resourcekey="valRequireHostName" ControlToValidate="txtHostName"
|
||||||
ErrorMessage="Enter hostname" ValidationGroup="CreateSite" Display="Dynamic" Text="*" SetFocusOnError="True"></asp:RequiredFieldValidator>
|
ErrorMessage="Enter hostname" ValidationGroup="CreateSite" Display="Dynamic" Text="*" SetFocusOnError="True"></asp:RequiredFieldValidator>
|
||||||
<asp:RegularExpressionValidator ID="valRequireCorrectHostName" runat="server"
|
<asp:RegularExpressionValidator ID="valRequireCorrectHostName" runat="server"
|
||||||
|
|
|
@ -63,6 +63,18 @@ namespace WebsitePanel.Portal
|
||||||
private void ToggleControls()
|
private void ToggleControls()
|
||||||
{
|
{
|
||||||
rowDedicatedIP.Visible = rbDedicatedIP.Checked;
|
rowDedicatedIP.Visible = rbDedicatedIP.Checked;
|
||||||
|
|
||||||
|
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
||||||
|
|
||||||
|
if (Utils.CheckQouta(Quotas.WEB_ENABLEHOSTNAMESUPPORT, cntx))
|
||||||
|
{
|
||||||
|
txtHostName.Visible = chkIgnoreGlobalDNSRecords.Visible = lblIgnoreGlobalDNSRecords.Visible = lblTheDotInTheMiddle.Visible = true;
|
||||||
|
UserSettings settings = ES.Services.Users.GetUserSettings(PanelSecurity.LoggedUserId, UserSettings.WEB_POLICY);
|
||||||
|
txtHostName.Text = String.IsNullOrEmpty(settings["HostName"]) ? "" : settings["HostName"];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
txtHostName.Visible = chkIgnoreGlobalDNSRecords.Visible = lblIgnoreGlobalDNSRecords.Visible = lblTheDotInTheMiddle.Visible = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void BindIgnoreZoneTemplate()
|
private void BindIgnoreZoneTemplate()
|
||||||
|
|
|
@ -39,6 +39,15 @@ namespace WebsitePanel.Portal {
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::System.Web.UI.WebControls.TextBox txtHostName;
|
protected global::System.Web.UI.WebControls.TextBox txtHostName;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// lblTheDotInTheMiddle 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 lblTheDotInTheMiddle;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// domainsSelectDomainControl control.
|
/// domainsSelectDomainControl control.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue