Is it possible that each areas on MVC2 run on separate IIS website?
Lets say I want my Admin (area) to run on HTTPS and the default site runs on开发者_C百科 HTTP.
Is this possible? How?
How to force SSL in MVC 2.0
public AccountController: Controller{
[RequireHttps(Order=1), Authorize(Roles="Users",Order=2)]
public ActionResult Login(){
// Add login logic
return View();
}
}
The only other thing you will need to do is setup your SSL cert in IIS, but don't require it if you only want to use it in certain areas/controllers/functions.
精彩评论