开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜