我一直在尝试禁用Azure上的RC4密码,但没有成功。我遇到了一个与Web角色一起工作的代码示例:
string[] subKeys = new string[]
{
"RC4 40/128",
"RC4 56/128",
"RC4 64/128",
"RC4 128/128",
};
RegistryKey parentKey = Registry.LocalMachine.OpenSubKey(@"SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers", true);
foreach(string keyName in subKeys)
{
var newKey = parentKey.CreateSubKey(keyName);
newKey.SetValue("Enabled", 0);
newKey.Close();
}
当我们使用WebApp时,我创建了一个包含上面代码的WebJob。执行后,我得到一个安全异常:
System.Security.SecurityException:不允许请求的注册表访问。
有没有办法在提升的执行上下文中运行WebJob?还是使用PowerShell的方法?
我们目前正在审核中,被标记为需要关注的内容。
您无法使用WebApp实现此目的。由于WebApp在多租户环境中运行,因此对注册表的访问受到限制。此页面包含WebApps和WebRoles之间的功能比较。
https://azure.microsoft.com/zh-CN/documentation/articles/choose-web-site-cloud-service-vm/
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句