Redirecting MVC controller to HTTPS if required

Check out this excellent blog on how to create a simple ActionFilterAttribute that handles redirecting to https:// if required.

then just decorate your whole Controller ot ActionResult method with

 public class AccountController : Controller

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.