在ASP.NET使用的的machineKey [英] Uses for MachineKey in ASP.NET

查看:84
本文介绍了在ASP.NET使用的的machineKey的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么不同的方式是计算机密钥在asp.net中有用吗?
我认为以下是正确的,但认为可能还有更多。


  1. 多个应用程序可以使用相同的cookie

  2. 多台服务器可以使用相同的视图状态工作


解决方案

的machineKey用于:


  • ViewState的加密和验证

  • 表单验证(或联合身份验证)使用该密钥签署的身份验证票证

拥有多台服务器上安装了Web应用程序,需要对它们进行配置,以实现负​​载平衡工作的同一台机器密钥。

要查看所有的详细​​信息,请参考: MSDN如何配置的machineKey在ASP.NET 2.0

What different ways are Machine Keys useful in asp.net? I think the following are correct but thought there may be more.

  1. Multiple applications can use the same cookie
  2. Multiple servers can work with the same viewstate

解决方案

MachineKey is used for:

  • ViewState encryption and validation
  • Forms Authentication (or Federated Authentication) uses this key for signing the authentication ticket

Having a Web App installed on multiple servers requires same Machine Key configured on all of them in order for Load Balancing to work.

To see all details, please refer to: MSDN How To: Configure MachineKey in ASP.NET 2.0

这篇关于在ASP.NET使用的的machineKey的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆