本文介绍了我怎么知道,如果正在使用从我的machine.config将machineKey节?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图生成自定义密钥用于加密web.config文件中的一个项目,并使用相同的密钥在多台计算机。

I'm trying to generate a custom key for encrypting the web.config in a project, and use the same key on several machines.

我已经照着这个例子来自微软: http://support.microsoft.com/kb/312906

I've followed this example from Microsoft: http://support.microsoft.com/kb/312906

然而,当我加密​​我的web.config(我使用卡西尼号,而不是IIS,我的机器上),它似乎并没有使用新创建的部分我machine.config中。还是没有呢?我怎么知道?当我做了更改,加密的web.config文件,该网站工作得很好。并试图证明我的自定义键时,我更改字符在decryptionKey值,并重新启动开发环境。但它仍然有效,我的猜测指向我的钥匙不使用的事实。

However, when I encrypt my web.config (and I'm using cassini, not IIS, on my machine) it doesn't seem to use the newly created section in my machine.config. Or does it? How do I know? When I've made the changes and encrypted the web.config, the sites works just fine. And to try to prove that my custom key is used, I change a character in the decryptionKey value and restart the dev environment. But it still works, which I guess points to the fact that my keys aren't used.

我是什么在这里失踪?

推荐答案

我忘了指定加密时使用的供应商。在那之后一切正常。

I forgot to specify which provider to use when encrypting. Everything worked fine after that.

这篇关于我怎么知道,如果正在使用从我的machine.config将machineKey节?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-26 11:10