Profile

Click to view full profile
Hi, I'm Veerapat Sriarunrungrueang, an expert in technology field, especially full stack web development and performance testing.This is my coding diary. I usually develop and keep code snippets or some tricks, and update to this diary when I have time. Nowadays, I've been giving counsel to many well-known firms in Thailand.
view more...

Monday, June 20, 2011

Requiring HTTPS in ASP.NET MVC3

You can simply use RequireHttpsAttribute to your Action or Controller.

For Example:
[RequireHttps]
public ActionResult SignIn()
{
   return View();
}

More details at: http://weblogs.asp.net/dwahlin/archive/2009/08/25/requiring-ssl-for-asp-net-mvc-controllers.aspxhttp://salvoz.com/blog/2009/04/25/partial-ssl-and-authorization-with-asp-net-mvc-revisited/

No comments:

Post a Comment