我想将machineKey添加到我的machine.config中,因为我正在使用Web场方案中的web.config连接字符串的编程加密。
我的问题是,我在哪里将machineKey放在machine.config文件中?我已经没有可以替换的了,我怀疑它是自动生成的,所以应该放在哪里?
把它放在<system.web>
下面
如果您需要生成密钥,我想使用此网站上的工具:Machine Key Generator
更新:以上链接似乎已经死了,here is another site to generate keys
在<system.web>
内:
<system.web>
<machineKey
validationKey="....."
decryptionKey="....."
/>
至少在我的文件的底部。我不认为system.web中元素的顺序很重要,只要它是system.web元素正下方的顶层。