开发者

How do I know if the machineKey section from my machine.config is being used?

I'm trying to generate a custom key for encrypting the we开发者_开发知识库b.config in a project, and use the same key on several machines.

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

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.

What am I missing here?


I've got a simple test... put some garbage (invalid XML) in your machine.config and restart your dev environment (not Cassini) and see if Cassini chokes, which would indicate that it is reloading machine.config.


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

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜