标签归档:machineKey

web.config machineKey

using System.Web.Configuration;
//打开web.config文件,写入新生成的machineKey
Configuration config = WebConfigurationManager.OpenWebConfiguration("/");
MachineKeySection configSection = (MachineKeySection)config.GetSection("system.web/machineKey");
configSection.ValidationKey = CreateKey(64);
configSec...

继续阅读

发表在 .net | 标签为 | web.config machineKey已关闭评论