SSL ASP.NET MVC 3 - Force SSL

Implementing SSL in an asp.net MVC application is snack with .net 4. Use cases for implementation off SSL in web development exist in:

·          - Shopping Cart Checkouts

·          - Account login area

Any real area encrypted data would be necessary.

To enable this simply implement the attribute tag RequireHttps:

[RequireHttps] //apply to all actions in controller
public class SomeController
{
 
//... or ...
  [
RequireHttps] //apply to this action only
 
public ActionResult SomeAction()
  {
  }

}

 No tedious URL rewriting required.