I am converting an asp.net application into mvc3. Lets say I have a sign in page that requires https and every other page only needs http how can I redirect the signin to ht
I like this solution because: 1. Cause you never have to touch it again in VS. The decorator by itself causes the browser to render the site in https even in debug.
If you implement it into a base controller and have all your controllers inherit from that controller, you know there is no slipping in the back do "So to speak".
#if !DEBUG
#define RELEASE
#endif namespace ProjectName.UI.Controllers {
using System.Web.Mvc;
#if RELEASE
[RequireHttps]
#endif
public abstract partial class ProjectNameBaseController : Controller
{
}
}