0

Adding support of cyrillic domains in websitepanel

method 1

If you not using AWStats(it not working whith cyrillic site names) you can change a ValidationExpression in WebPortal_folder\DesktopModules\WebsitePanel\DomainsAddDomain.aspx

Source:

ValidationExpression="^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?)(\.[a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?){0,9}$"

Changed:

ValidationExpression="^([a-zA-Zа-яА-Я0-9]([a-zA-Zа-яА-Я0-9\-]{0,61}[a-zA-Zа-яА-Я0-9])?)(\.[a-zA-Zа-яА-Я0-9]([a-zA-Zа-яА-Я0-9\-]{0,61}[a-zA-Zа-яА-Я0-9])?){0,9}$"

In this case, when you creating a site, folder will be have also a cyrillic name. In my situation this was a non correct decision and i did method 2.

 

method 2

 

You must get source code of websitepanel(they must be the same version that a panel in your production) and do the next:

add the regular expresion with allowed cyrillic symbols to «Domain alias» who can be used like an alias to the existing site(for example: client123.yourcompany.com. This domain may be technical domain, what provided to client by your company).

1)Open project «WebsitePanel.WebPortal»

2)Open «DomainsAddDomain.ascx.cs»

3)And replace the code

if (type == DomainType.Domain || type == DomainType.DomainPointer)
{
// domains
DomainPanel.Visible = true;
}

by the next:

if (type == DomainType.Domain)
{
// domains
DomainPanel.Visible = true;
}
else if (type == DomainType.DomainPointer)
{
PointerPanel.Visible = true;
}

and next code

// get domain name
string domainName = DomainName.Text.Trim();
if (type == DomainType.SubDomain || type == DomainType.ProviderSubDomain)
domainName = SubDomainName.Text.Trim() + "." + DomainsList.SelectedValue;

by the

// get domain name
string domainName = DomainName.Text.Trim();
if (type == DomainType.SubDomain || type == DomainType.ProviderSubDomain)
domainName = SubDomainName.Text.Trim() + "." + DomainsList.SelectedValue;
if (type == DomainType.DomainPointer)
domainName = PointerName.Text.Trim();

4) Open «DomainsAddDomain.ascx»
5) Add new filter in existing(for example after < /p> of SubDomainPanel, he looks like a code below)

<p id="PointerPanel" style="padding: 15px 0 15px 5px;">

ControlToValidate="PointerName" Display="Dynamic" ValidationGroup="Domain" SetFocusOnError="true"&gt;</p>

6) Compile a project

7) From directory WebsitePanel\Sources\WebsitePanel.WebPortal\bin copy dlls WebsitePanel.Portal.Modules.dll and WebsitePanel.WebPortal.dll to your production in WebsitePanel\Portal\bin(!create a backup of this libraries before replacing!)

8) Copy DomainsAddDomain.ascx in the WebsitePanel\Portal\DesktopModules\WebsitePanel

Настройка и администрирование Windows/Linux, сетевого оборудования D-link, cisco | hotbits.ru

XpycT

Добавить комментарий

Ваш e-mail не будет опубликован. Обязательные поля помечены *