If I deploy two azure web roles do I need to set my machine key?

北战南征 提交于 2019-12-11 11:23:04

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!