How to set SSL for the logon.aspx page

Customer care manager

Juraj Ondrus asked on September 4, 2008 07:23

How to set SSL for the logon.aspx page

Correct Answer

Juraj Ondrus answered on September 4, 2008 07:23

To set SSL for the logon.aspx page, please go to your solution in Visual Studio and open CMSPages/logon.aspx and its code-behind file.
Now write the following code in the Page_Load method:

if (HttpContext.Current.Request.Url.AbsoluteUri.ToLower().StartsWith("http://"))
{
   Response.Redirect(HttpContext.Current.Request.Url.AbsoluteUri.Replace("http://", "https://"));
}

0 votesVote for this answer Unmark Correct answer

   Please, sign in to be able to submit a new answer.