简体   繁体   中英

machineKey on Web Farm?

some articles say one thing and some other... i need to fix things in my head :

1) if im using StateServer in my web farm i need to set the same MachineKey ... why ? is it for the viewState issue or for session issue ? the session issue has been treated by StateServer Solution... so i dont understand... or is it for the viewState ...?

2) Is this also apply to Sql session Server ?

3) or the MachineKey issue is only for encrypted ViewState situations ?( the MAC...) ??

im confused !

The reason that the web farm servers need to share the same machineKey is that in any scenario that involves encryption/decryption, that is the key they will use. Because it's a web farm, you won't have any way to know which machine will handle any particular request, so they all have to have the same key so that they can decrypt items that were encrypted by other machines in the farm, and that whatever they encrypt can in turn be decrypted by another machine later.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM