DOmain Pointers adjusted:

When creating a new website the GlobalDNSRecord configuration defines the
hostheaders/websitepointer to be created

Various forms updated where the hostname field is set to www

GlobalDNSRecord  allows empty recordData field

To create related dns records when creating a hostheader/website pointer with
the specification of a hostname a 'A' or 'CNAME' globalDNSRecord definition
of '[host_name]' is required to create the the dns record.
This commit is contained in:
robvde 2012-09-13 12:43:42 +04:00
parent b54e810508
commit 9c9337ab94
14 changed files with 217 additions and 237 deletions

View file

@ -102,7 +102,6 @@ namespace WebsitePanel.EnterpriseServer
if (allowEmptyValue)
{
if (String.IsNullOrEmpty(str)) return str;
if (String.IsNullOrEmpty(value)) return string.Empty;
}
else
{

View file

@ -310,8 +310,11 @@ namespace WebsitePanel.EnterpriseServer
rr.MxPriority = record.MxPriority;
if (!String.IsNullOrEmpty(rr.RecordData))
{
if (rr.RecordName != "[host_name]")
zoneRecords.Add(rr);
}
}
return zoneRecords;
}

View file

@ -2005,6 +2005,7 @@ namespace WebsitePanel.EnterpriseServer
}
// delete zone if required
if (!domain.IsDomainPointer)
DnsServerController.DeleteZone(domain.ZoneItemId);
// delete domain

View file

@ -240,13 +240,12 @@ namespace WebsitePanel.EnterpriseServer
ipAddr = !String.IsNullOrEmpty(ip.InternalIP) ? ip.InternalIP : ip.ExternalIP;
// load domain instant alias
/*
/*
string instantAlias = ServerController.GetDomainAlias(packageId, domainName);
DomainInfo instantDomain = ServerController.GetDomain(instantAlias);
if (instantDomain == null || instantDomain.WebSiteId > 0)
instantAlias = "";
*/
*/
// load web DNS records
List<GlobalDnsRecord> dnsRecords = ServerController.GetDnsRecordsByService(serviceId);
@ -257,17 +256,18 @@ namespace WebsitePanel.EnterpriseServer
{
// SHARED IP
// fill main domain bindings
/*
FillWebServerBindings(bindings, dnsRecords, ipAddr, domain.DomainName);
FillWebServerBindings(bindings, dnsRecords, ipAddr, hostName, domain.DomainName, false);
// fill alias bindings if required
/*
if (addInstantAlias && !String.IsNullOrEmpty(instantAlias))
{
// fill bindings from DNS "A" records
FillWebServerBindings(bindings, dnsRecords, ipAddr, instantAlias);
FillWebServerBindings(bindings, dnsRecords, ipAddr, "", instantAlias);
}
*/
bindings.Add(new ServerBinding(ipAddr, "80", siteName));
//bindings.Add(new ServerBinding(ipAddr, "80", siteName));
}
else
{
@ -396,7 +396,7 @@ namespace WebsitePanel.EnterpriseServer
// add instant pointer
/*
if (addInstantAlias && !String.IsNullOrEmpty(instantAlias))
AddWebSitePointer(siteItemId, instantDomain.DomainId, false);
AddWebSitePointer(siteItemId, "", instantDomain.DomainId, false);
*/
// add parking page
@ -573,12 +573,12 @@ namespace WebsitePanel.EnterpriseServer
// remove all web site pointers
List<DomainInfo> pointers = GetWebSitePointers(siteItemId);
foreach (DomainInfo pointer in pointers)
DeleteWebSitePointer(siteItemId, pointer.DomainId, false);
DeleteWebSitePointer(siteItemId, pointer.DomainId, false, true);
// remove web site main pointer
DomainInfo domain = ServerController.GetDomain(siteItem.Name);
if(domain != null)
DeleteWebSitePointer(siteItemId, domain.DomainId, false);
DeleteWebSitePointer(siteItemId, domain.DomainId, false, true);
// delete web site
WebServer web = new WebServer();
@ -611,7 +611,7 @@ namespace WebsitePanel.EnterpriseServer
}
private static void FillWebServerBindings(List<ServerBinding> bindings, List<GlobalDnsRecord> dnsRecords,
string ipAddr, string hostName, string domainName)
string ipAddr, string hostName, string domainName, bool ignoreGlobalDNSRecords)
// TODO test if IPv6 works
{
int bindingsCount = bindings.Count;
@ -628,25 +628,52 @@ namespace WebsitePanel.EnterpriseServer
*/
string tmpName = string.Empty;
if (!String.IsNullOrEmpty(hostName))
tmpName = Utils.ReplaceStringVariable(dnsRecord.RecordName, "host_name", hostName);
if (!(tmpName== "[host_name]"))
{
string recordData = string.Empty;
if (tmpName.Contains("."))
recordData = hostName;
else
recordData = tmpName + ((tmpName != "") ? "." : "") + domainName;
bindings.Add(new ServerBinding(ipAddr, "80", recordData));
if (ignoreGlobalDNSRecords)
{
if (dnsRecord.RecordName == "[host_name]")
{
AddBinding(bindings, new ServerBinding(ipAddr, "80", recordData));
break;
}
}
else
{
AddBinding(bindings, new ServerBinding(ipAddr, "80", recordData));
}
}
}
}
if(bindings.Count == bindingsCount)
if ((bindings.Count == bindingsCount) | (bindings.Count == 0))
{
bindings.Add(new ServerBinding(ipAddr, "80", string.IsNullOrEmpty(hostName) ? domainName : hostName + "." + domainName));
AddBinding(bindings, new ServerBinding(ipAddr, "80", string.IsNullOrEmpty(hostName) ? domainName : hostName + "." + domainName));
}
}
private static void AddBinding(List<ServerBinding> bindings, ServerBinding binding)
{
foreach (ServerBinding b in bindings)
{
if (string.Compare(b.Host, binding.Host, true) == 0)
return;
}
bindings.Add(binding);
}
private static string GetWebSiteUsername(UserSettings webPolicy, string domainName)
{
UsernamePolicy policy = new UsernamePolicy(webPolicy["AnonymousAccountPolicy"]);
@ -732,10 +759,15 @@ namespace WebsitePanel.EnterpriseServer
public static int AddWebSitePointer(int siteItemId, string hostName, int domainId)
{
return AddWebSitePointer(siteItemId, hostName, domainId, true);
return AddWebSitePointer(siteItemId, hostName, domainId, true, true);
}
internal static int AddWebSitePointer(int siteItemId, string hostName, int domainId, bool updateWebSite)
{
return AddWebSitePointer(siteItemId, hostName, domainId, updateWebSite, false);
}
internal static int AddWebSitePointer(int siteItemId, string hostName, int domainId, bool updateWebSite, bool ignoreGlobalDNSRecords)
{
// check account
int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive);
@ -773,13 +805,38 @@ namespace WebsitePanel.EnterpriseServer
// load appropriate zone
DnsZone zone = (DnsZone)PackageController.GetPackageItem(domain.ZoneItemId);
if (zone != null)
{
// change DNS zone
List<GlobalDnsRecord> tmpDnsRecords = new List<GlobalDnsRecord>();
string serviceIp = (ip != null) ? ip.ExternalIP : null;
if (ignoreGlobalDNSRecords)
{
foreach (GlobalDnsRecord r in dnsRecords)
{
if (r.RecordName == "[host_name]")
tmpDnsRecords.Add(r);
}
}
else
tmpDnsRecords = dnsRecords;
List<DnsRecord> resourceRecords = DnsServerController.BuildDnsResourceRecords(
dnsRecords, hostName, domain.DomainName, serviceIp);
tmpDnsRecords, hostName, domain.DomainName, serviceIp);
foreach (DnsRecord r in resourceRecords)
{
if (r.RecordName != "*")
{
// check if the web site already exists
if (DataProvider.CheckDomain(domain.PackageId, string.IsNullOrEmpty(r.RecordName) ? domain.DomainName : r.RecordName + "." + domain.DomainName, true) != 0)
return BusinessErrorCodes.ERROR_WEB_SITE_ALREADY_EXISTS;
}
}
try
{
@ -796,13 +853,12 @@ namespace WebsitePanel.EnterpriseServer
}
// update host headers
if (updateWebSite)
{
List<ServerBinding> bindings = new List<ServerBinding>();
// get existing web site bindings
WebServer web = new WebServer();
ServiceProviderProxy.Init(web, siteItem.ServiceId);
List<ServerBinding> bindings = new List<ServerBinding>();
bindings.AddRange(web.GetSiteBindings(siteItem.SiteId));
// check if web site has dedicated IP assigned
@ -817,7 +873,7 @@ namespace WebsitePanel.EnterpriseServer
ipAddr = !String.IsNullOrEmpty(ip.InternalIP) ? ip.InternalIP : ip.ExternalIP;
// fill bindings
FillWebServerBindings(bindings, dnsRecords, ipAddr, hostName, domain.DomainName);
FillWebServerBindings(bindings, dnsRecords, ipAddr, hostName, domain.DomainName, ignoreGlobalDNSRecords);
foreach (ServerBinding b in bindings)
{
@ -826,17 +882,18 @@ namespace WebsitePanel.EnterpriseServer
}
// update bindings
if (updateWebSite)
web.UpdateSiteBindings(siteItem.SiteId, bindings.ToArray());
}
}
// update domain
domain.WebSiteId = siteItemId;
//ServerController.UpdateDomain(domain);
if (!String.IsNullOrEmpty(hostName))
domain.DomainName = hostName + "." + domain.DomainName;
else
domain.DomainName = domain.DomainName;
foreach (ServerBinding b in bindings)
{
domain.DomainName = b.Host;
domain.IsDomainPointer = true;
int domainID = ServerController.AddDomain(domain);
@ -847,6 +904,7 @@ namespace WebsitePanel.EnterpriseServer
domainTmp.ZoneItemId = domain.ZoneItemId;
ServerController.UpdateDomain(domainTmp);
}
}
return 0;
@ -863,10 +921,10 @@ namespace WebsitePanel.EnterpriseServer
public static int DeleteWebSitePointer(int siteItemId, int domainId)
{
return DeleteWebSitePointer(siteItemId, domainId, true);
return DeleteWebSitePointer(siteItemId, domainId, true, true);
}
public static int DeleteWebSitePointer(int siteItemId, int domainId, bool updateWebSite)
public static int DeleteWebSitePointer(int siteItemId, int domainId, bool updateWebSite, bool ignoreGlobalDNSRecords)
{
// check account
int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive);
@ -895,16 +953,29 @@ namespace WebsitePanel.EnterpriseServer
TaskManager.StartTask("WEB_SITE", "DELETE_POINTER", siteItem.Name);
TaskManager.ItemId = siteItemId;
TaskManager.WriteParameter("Domain pointer", domain.DomainName);
TaskManager.WriteParameter("updateWebSite", updateWebSite.ToString());
try
{
if (zone != null)
{
// change DNS zone
List<GlobalDnsRecord> tmpDnsRecords = new List<GlobalDnsRecord>();
string serviceIp = (ip != null) ? ip.ExternalIP : null;
if (ignoreGlobalDNSRecords)
{
foreach (GlobalDnsRecord r in dnsRecords)
{
if (r.RecordName == "[host_name]")
tmpDnsRecords.Add(r);
}
}
else tmpDnsRecords = dnsRecords;
List<DnsRecord> resourceRecords = DnsServerController.BuildDnsResourceRecords(
dnsRecords, domain.DomainName, "", serviceIp);
tmpDnsRecords, domain.DomainName, "", serviceIp);
try
{
@ -918,8 +989,6 @@ namespace WebsitePanel.EnterpriseServer
}
}
if (updateWebSite)
{
// get existing web site bindings
WebServer web = new WebServer();
ServiceProviderProxy.Init(web, siteItem.ServiceId);
@ -935,7 +1004,7 @@ namespace WebsitePanel.EnterpriseServer
{
// remove host headers
List<ServerBinding> domainBindings = new List<ServerBinding>();
FillWebServerBindings(domainBindings, dnsRecords, "", domain.DomainName, "");
FillWebServerBindings(domainBindings, dnsRecords, "", domain.DomainName, "", ignoreGlobalDNSRecords);
// fill to remove list
List<string> headersToRemove = new List<string>();
@ -946,9 +1015,9 @@ namespace WebsitePanel.EnterpriseServer
bindings.RemoveAll(b => { return headersToRemove.Contains(b.Host) && b.Port == "80"; } );
// update bindings
if (updateWebSite)
web.UpdateSiteBindings(siteItem.SiteId, bindings.ToArray());
}
}
// update domain
domain.WebSiteId = 0;

View file

@ -54,10 +54,12 @@
<td class="SubHead"><asp:Label ID="lblRecordData" runat="server" meta:resourcekey="lblRecordData" Text="Record Data:"></asp:Label></td>
<td class="Normal" nowrap>
<asp:TextBox ID="txtRecordData" runat="server" Width="260px" CssClass="NormalTextBox"></asp:TextBox><uc1:SelectIPAddress ID="ipAddress" runat="server" />
<!--
<asp:RequiredFieldValidator ID="valRequireData" runat="server" ControlToValidate="txtRecordData"
ErrorMessage="*" ValidationGroup="DnsRecord" Display="Dynamic"></asp:RequiredFieldValidator>
-->
<asp:CustomValidator ID="IPValidator" runat="server" ControlToValidate="txtRecordData" ValidationGroup="DnsRecord" Display="Dynamic" CssClass="NormalBold"
OnServerValidate="Validate" Text="Please enter a valid IP" meta:resourcekey="IPValidator"/>
OnServerValidate="Validate" Text="Please enter a valid IP" meta:resourcekey="IPValidator" ValidateEmptyText="True" />
</td>
</tr>
<tr id="rowMXPriority" runat="server">

View file

@ -178,6 +178,9 @@ namespace WebsitePanel.Portal
protected void Validate(object source, ServerValidateEventArgs args) {
var ip = args.Value;
System.Net.IPAddress ipaddr;
if (string.IsNullOrEmpty(args.Value))
args.IsValid = true;
else
args.IsValid = System.Net.IPAddress.TryParse(ip, out ipaddr) && (ip.Contains(":") || ip.Contains(".")) &&
((ddlRecordType.SelectedValue == "A" && ipaddr.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork) ||
(ddlRecordType.SelectedValue == "AAAA" && ipaddr.AddressFamily == System.Net.Sockets.AddressFamily.InterNetworkV6));
@ -185,6 +188,7 @@ namespace WebsitePanel.Portal
private void SaveRecord()
{
if (!string.IsNullOrEmpty(txtRecordData.Text))
if (!Page.IsValid) return;
GlobalDnsRecord record = new GlobalDnsRecord();

View file

@ -1,32 +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>
// This code was generated by a tool.
@ -149,6 +120,24 @@ namespace WebsitePanel.Portal {
/// </remarks>
protected global::WebsitePanel.Portal.SelectIPAddress ipAddress;
/// <summary>
/// valRequireData 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.RequiredFieldValidator valRequireData;
/// <summary>
/// IPValidator 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.CustomValidator IPValidator;
/// <summary>
/// rowMXPriority control.
/// </summary>
@ -176,6 +165,24 @@ namespace WebsitePanel.Portal {
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtMXPriority;
/// <summary>
/// valRequireMxPriority 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.RequiredFieldValidator valRequireMxPriority;
/// <summary>
/// valRequireCorrectPriority 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.RegularExpressionValidator valRequireCorrectPriority;
/// <summary>
/// rowSRVPriority control.
/// </summary>

View file

@ -97,17 +97,6 @@
Text="Create Web Site" Checked="True" />
</td>
</tr>
<tr>
<td class="Normal" width="100%">
<asp:Label ID="lblHostName" runat="server" meta:resourcekey="lblHostName" Text="Host name:"></asp:Label>
<asp:TextBox ID="txtHostName" runat="server" CssClass="NormalTextBox" Width="250px" MaxLength="64"></asp:TextBox>
<asp:RequiredFieldValidator ID="valRequireHostName" runat="server" meta:resourcekey="valRequireHostName" ControlToValidate="txtHostName"
ErrorMessage="Enter hostname" ValidationGroup="CreateSite" Display="Dynamic" Text="*" SetFocusOnError="True"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="valRequireCorrectHostName" runat="server"
ErrorMessage="Enter valid hostname" ControlToValidate="txtHostName" Display="Dynamic"
meta:resourcekey="valRequireCorrectHostName" ValidationExpression="^([0-9a-zA-Z])*[0-9a-zA-Z]+$" SetFocusOnError="True"></asp:RegularExpressionValidator>
</td>
</tr>
</table>
</fieldset>

View file

@ -125,8 +125,6 @@ namespace WebsitePanel.Portal
string domainName = txtDomainName.Text.Trim();
string hostName = txtHostName.Text.Trim();
PackageResult result = null;
try
{
@ -136,7 +134,7 @@ namespace WebsitePanel.Portal
Utils.ParseInt(ddlStatus.SelectedValue, 0),
chkPackageLetter.Checked,
chkCreateResources.Checked, domainName, true, chkCreateWebSite.Checked,
chkCreateFtpAccount.Checked, ftpAccount, chkCreateMailAccount.Checked, hostName);
chkCreateFtpAccount.Checked, ftpAccount, chkCreateMailAccount.Checked, "");
if (result.Result < 0)
{

View file

@ -210,42 +210,6 @@ namespace WebsitePanel.Portal {
/// </remarks>
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>
/// valRequireHostName 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.RequiredFieldValidator valRequireHostName;
/// <summary>
/// valRequireCorrectHostName 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.RegularExpressionValidator valRequireCorrectHostName;
/// <summary>
/// fsFtp control.
/// </summary>

View file

@ -7,7 +7,7 @@
<asp:Label ID="lblDomainName" runat="server" meta:resourcekey="lblDomainName" Text="Domain name:"></asp:Label>
</td>
<td>
<asp:TextBox ID="txtHostName" runat="server" CssClass="TextBox100" MaxLength="64"></asp:TextBox>.<uc1:DomainsSelectDomainControl ID="domainsSelectDomainControl" runat="server" HideWebSites="true" HideDomainPointers="true" />
<asp:TextBox ID="txtHostName" runat="server" CssClass="TextBox100" MaxLength="64" Text="www"></asp:TextBox>.<uc1:DomainsSelectDomainControl ID="domainsSelectDomainControl" runat="server" HideWebSites="true" HideDomainPointers="true" />
<asp:RequiredFieldValidator ID="valRequireHostName" runat="server" meta:resourcekey="valRequireHostName" ControlToValidate="txtHostName"
ErrorMessage="Enter hostname" ValidationGroup="CreateSite" Display="Dynamic" Text="*" SetFocusOnError="True"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="valRequireCorrectHostName" runat="server"

View file

@ -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>
// This code was generated by a tool.

View file

@ -11,7 +11,7 @@
<asp:Label ID="lblDomainName" runat="server" meta:resourcekey="lblDomainName" Text="Domain name:"></asp:Label>
</td>
<td>
<asp:TextBox ID="txtHostName" runat="server" CssClass="TextBox100" MaxLength="64"></asp:TextBox>.<uc1:DomainsSelectDomainControl ID="domainsSelectDomainControl" runat="server" HideWebSites="true" HideDomainPointers="true" />
<asp:TextBox ID="txtHostName" runat="server" CssClass="TextBox100" MaxLength="64" Text="www"></asp:TextBox>.<uc1:DomainsSelectDomainControl ID="domainsSelectDomainControl" runat="server" HideWebSites="true" HideDomainPointers="true" />
<asp:RequiredFieldValidator ID="valRequireHostName" runat="server" meta:resourcekey="valRequireHostName" ControlToValidate="txtHostName"
ErrorMessage="Enter hostname" ValidationGroup="CreateSite" Display="Dynamic" Text="*" SetFocusOnError="True"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="valRequireCorrectHostName" runat="server"

View file

@ -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>
// This code was generated by a tool.