开发者

How can I modify MachineKey for s Session State Server?

开发者 https://www.devze.com 2023-01-08 14:35 出处:网络
I\'m trying to implement a SessionState server to allow multiple web servers to share the same state. At first this will be the different development machines, and later it\'ll be the different web se

I'm trying to implement a SessionState server to allow multiple web servers to share the same state. At first this will be the different development machines, and later it'll be the different web servers in the web farm.

So far开发者_运维知识库, I'm making good progress I think, but one of the requirements has me confused. In order to implement this, I need to make sure that all web servers are using the same machine key.

This is a sample MachineKey taken from my local development machine:

<section name="machineKey"
    type="System.Web.Configuration.MachineKeySection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
    allowDefinition="MachineToApplication"/>

If we have a Session State Server deployed locally, do we need to ensure that all other machines using this service (specifically, the other developers working on the same project, and then when we deploy to the web farm) have the exact same entry in their Machine.Config files?

Or do I have to somehow generate a new machine key that can apply to all the machines?


I ended up using this:

ASP.NET machineKey Generator


The MachineKey is the key, and the session gets encrypted to the user.

That means, they are only useful on the web servers, as they are encrypting it to the client requests.

I think the SessionState machine key is not important at all (but I didn’t find now the documentation stating that...)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号