问题
We're using asp.net mvc forms authentication and I remember in other web farm scenarios it's a good idea to make sure the machine keys match between servers. I'm about to sale the same web role from 1 to 2 and I'm curious if this step is necessary for Azure or does it take care of that? Thanks
回答1:
Each role should share the same machine key explicitly. Azure only does this for you when you scale multiple instances of 1 web role, not add an additional separate role. For example we had to do this because 2 of our sites use the same authentication system. Since the .ASPXAUTH cookie is encrypted based on machine key values, the logins only work on both sites when they share the same machine key.
来源:https://stackoverflow.com/questions/22999786/if-i-deploy-two-azure-web-roles-do-i-need-to-set-my-machine-key