I found this link Best way in asp.net to force https for an entire site? and it redirects the whole site to https.
I only want to use https for the pages need to be authorized (usually with [Authorization]
attribute) - e.g. account management and some other pages, plus login page. And don't use https for these pages don't need to be authorized.