Reputation: 3873
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
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