使用 HTTPS 部署 asp.net MVC 1.0 应用程序
我们有一个基于 ASP.NET MVC 1.0 构建的应用程序,部署后,应该使用 HTTPS 进行访问。我尝试了几种 HTTPS 方法,但有几个问题:
我的主页不需要受到保护 (HTTPS),但它后面的其余超链接将受到保护。
我读到了有关操作方法属性 [requiresHTTPS] 的信息,但是我想了解在本地计算机上开发期间该标记会发生什么情况。
在开发环境中,如何在开发计算机/虚拟目录上安装证书来编码和测试我的更改。
所以这个应用程序本质上很复杂,我们有大约 13 个控制器和 50 个操作方法。该应用程序将包含信用卡号等信息,因为我们接受通过该网站付款。
非常感谢!
We have an application built on ASP.NET MVC 1.0 which, once deployed, should be accessed with HTTPS. I tried few approaches for HTTPS but I have a few questions.:
My home page does not need to be Secured (HTTPS), but rest of the hyperlinks following it will be Secured.
I read about the action method attribute [requiresHTTPS] however I want to understand what happens to that tag during development on local machine.
In a development enviroment, how do I install a certificate on a dev machine/virtual directory to code and test my changes.
So this application is complex in nature and we have around 13 controllers and 50 action methods. This application will have information like Credit card numbers since we do accept payment through this website.
Thanks much !
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果只是应用程序中的几个静态页面不需要保护,我强烈建议通过在 IIS 中配置两个不同的站点(一个用于实际的站点)来简单地要求 SSL 来实现一切。页面仅在端口 443 上,一个页面在端口 80 上并具有永久重定向。
优点:
关于可能的缺点:与应用程序的其余部分相比,通过 SSL 对静态资源提供一些请求可能几乎没有开销。
If it is just about a few static pages of your application that don't need to be secured, I would strongly recommend to simply require SSL for everything by configuring two different sites in IIS, one for the actual page only on port 443, one on port 80 with a permanent redirect.
Advantages:
Regarding the possible disadvantage: serving a few requests on static resources via SSL is probably almost no overhead, compared to the rest of your application.