简体   繁体   中英

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?

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();
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM