What different ways are Machine Keys useful in asp.net? I think the following are correct but thought there may be more.
机器密钥在asp.net中有哪些不同的用途?我认为以下是正确的,但认为可能还有更多。
- Multiple applications can use the same cookie
- 多个应用程序可以使用相同的cookie
- Multiple servers can work with the same viewstate
- 多个服务器可以使用相同的视图状态
3 个解决方案
#1
20
MachineKey is used for:
MachineKey用于:
- ViewState encryption and validation
- ViewState加密和验证
- 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.
在多个服务器上安装Web App需要在所有服务器上配置相同的计算机密钥才能使负载平衡正常工作。
To see all details, please refer to: MSDN How To: Configure MachineKey in ASP.NET 2.0
要查看所有详细信息,请参阅:MSDN如何:在ASP.NET 2.0中配置MachineKey
#2
17
Machine key is also used to encrypt/decrypt the webresources.axd parameters.
机器密钥还用于加密/解密webresources.axd参数。
Even on a single server the machine key should be configured, because any recycle of the app domain will generate a new key when it is set to auto. This causes the next postback just for pages rendered before the recycle, to cause a viewstate validation error, and also issues with the resources during that time.
即使在单个服务器上,也应该配置计算机密钥,因为app域的任何回收都会在设置为auto时生成新密钥。这会导致下一个回发仅针对回收之前呈现的页面,导致视图状态验证错误,并且还会在此期间发出资源问题。
#3
-3
Encryption - very common.
加密 - 非常常见。
#1
20
MachineKey is used for:
MachineKey用于:
- ViewState encryption and validation
- ViewState加密和验证
- 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.
在多个服务器上安装Web App需要在所有服务器上配置相同的计算机密钥才能使负载平衡正常工作。
To see all details, please refer to: MSDN How To: Configure MachineKey in ASP.NET 2.0
要查看所有详细信息,请参阅:MSDN如何:在ASP.NET 2.0中配置MachineKey
#2
17
Machine key is also used to encrypt/decrypt the webresources.axd parameters.
机器密钥还用于加密/解密webresources.axd参数。
Even on a single server the machine key should be configured, because any recycle of the app domain will generate a new key when it is set to auto. This causes the next postback just for pages rendered before the recycle, to cause a viewstate validation error, and also issues with the resources during that time.
即使在单个服务器上,也应该配置计算机密钥,因为app域的任何回收都会在设置为auto时生成新密钥。这会导致下一个回发仅针对回收之前呈现的页面,导致视图状态验证错误,并且还会在此期间发出资源问题。
#3
-3
Encryption - very common.
加密 - 非常常见。