If you could add something to Kentico, what would it be and why?

Ignore Process Domain Prefix when under azurewebsites.net

Currently we implement most of our sites on Kentico within the Azure environment. One of the issues we consistently have project to project is when we set the Process Domain Prefix to always go to www, we can no longer use the sitename.azurewebsites.net url. This is because it will automatically redirect the site to www.sitename.azurewebsites.net which is invalid. Another issue with this is when trying to use Traffic manager within the Azure environment. Traffic manager uses the azurewebsites.net address and checks the response code of the request to ensure it is a 200. Traffic manager only views a 200 as a healthy http status code. Therefore if we have the domain prefix set to www, traffic manager calls sitename.azurewebsites.net but it gets a 301 redirect to www.sitename.azurewebsites.net. It therefore believes the website is degraded and causes a failover to the other server.

I would like to suggest that Kentico implement the logic for *.azurewebsites.net like it does localhost and does not do the automatic redirect to www subdomain. In looking at the code this could be done in the function in CMS.Helpers.UrlHelpers class below.

public static bool IsTldDomain(string domain)
{
IPAddress address;
return IPAddress.TryParse(domain, out address) || !domain.Contains(".") || !domain.Contains(“azurewebsites.net”);
}

Right now we cannot use the Process Domain Prefix out of the box if we want to use Traffic Manager. Instead we have to write our own rewrite urls within the web.config.

4 votes
Vote
Sign in
(thinking…)
Password icon
Signed in as (Sign out)
You have left! (?) (thinking…)
Anonymous shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

0 comments

Sign in
(thinking…)
Password icon
Signed in as (Sign out)
Submitting...

Feedback and Knowledge Base