ASP.NET MVC RequireHttps in Production Only

前端 未结 15 1886
花落未央
花落未央 2020-11-28 18:23

I want to use the RequireHttpsAttribute to prevent unsecured HTTP requests from being sent to an action method.

C#

[RequireHttps] //apply to all acti         


        
15条回答
  •  日久生厌
    2020-11-28 19:06

    Please refer to this post by Rick Anderson on RickAndMSFT on Azure & MVC Filling the Azure Gap

    http://blogs.msdn.com/b/rickandy/archive/2011/04/22/better-faster-easier-ssl-testing-for-asp-net-mvc-amp-webforms.aspx

提交回复
热议问题