在ASP.NET MVC SSL页 [英] SSL pages under ASP.NET MVC
本文介绍了在ASP.NET MVC SSL页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我如何去使用HTTPS对于一些在我的基于ASP.NET MVC网站的网页的?
How do I go about using HTTPS for some of the pages in my ASP.NET MVC based site?
史蒂夫·桑德森对如何在做到这一点,在干燥的方式上preVIEW 4 pretty很好的教程:
Steve Sanderson has a pretty good tutorial on how to do this in a DRY way on Preview 4 at:
<一个href=\"http://blog.$c$cville.net/2008/08/05/adding-httpsssl-support-to-aspnet-mvc-routing/\">http://blog.$c$cville.net/2008/08/05/adding-httpsssl-support-to-aspnet-mvc-routing/
是否与preVIEW更好/更新的方法5?
Is there a better / updated way with Preview 5?,
推荐答案
如果您使用的是 ASP。 NET MVC 2 preVIEW 2或更高,你现在可以简单地使用:
If you are using ASP.NET MVC 2 Preview 2 or higher, you can now simply use:
[RequireHttps]
public ActionResult Login()
{
return View();
}
不过,命令的参数值得注意的是,作为这里提到
这篇关于在ASP.NET MVC SSL页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文