用于 ASP.NET 中的 MachineKey [英] Uses for MachineKey in ASP.NET

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

问题描述

机器密钥在 asp.net 中有哪些不同的用途?我认为以下是正确的,但我认为可能还有更多.

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

  1. 多个应用程序可以使用同一个 cookie
  2. 多个服务器可以使用相同的视图状态

推荐答案

MachineKey 用于:

MachineKey is used for:

  • ViewState 加密和验证
  • 表单身份验证(或联合身份验证)使用此密钥对身份验证票进行签名

在多台服务器上安装 Web 应用需要在所有服务器上配置相同的机器密钥,以便负载平衡工作.

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

要查看所有详细信息,请参阅:MSDN 如何:配置ASP.NET 2.0 中的 MachineKey

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

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

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