There are a few ways to redirect from http to https in asp.net, but I wanted a somewhat simple and efficient method. After researching a bit, I could add some code to global.asax, or make my own custom configuration section in the web.config. Well I chose to do a little variation of a "custom" section in the web.config. I don’t end up creating a class that inherits from ConfigurationSection, but just a few other things.
To create a custom configuration section, here are a few links you may want to look at:
John Mendez has recently posted a vert good article on
"How to Redirect from Http to Https in ASP.NET ? "
You can read full article here : http://www.xdevsoftware.com/blog/post/Redirect-from-Http-to-Https-in-ASPNET.aspx
Hope this will help