Brad Bamford
Brad Bamford

Reputation: 3873

Can I force SSL to secure a Dotnetnuke Module Edit Page?

I have a DNN modules where I don't care if the VIEW page does not use SSL.

However, when a module editor loads my modules' EDIT page in the admin template (my module is the only module on the page) I want to load the page securely using SSL, if the site has SSL capability.

Is this possible?

Upvotes: 1

Views: 52

Answers (1)

Brad Bamford
Brad Bamford

Reputation: 3873

Yes, just put the following at the start of the modules's code behind.

// Force Page to use SSL if it can.
if (PortalSettings.SSLEnabled && !Request.IsSecureConnection)
{
  DotNetNuke.Security.PortalSecurity.ForceSecureConnection();
}

Upvotes: 0

Related Questions