不允许注册表访问 [英] Registry access is not Allowed

查看:187
本文介绍了不允许注册表访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从我的系统访问注册表时....我收到错误消息,例如不允许进行注册表访问.....

RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMachine,"192.168.1.5").OpenSubKey("SOFTWARE").OpenSubKey("Microsoft").OpenSubKey("Windows").OpenSubKey("CurrentVersion").OpenSubKey("Installer"). OpenSubKey("UserData").OpenSubKey("S-1-5-18").OpenSubKey("Products").GetSubKeyNames()

尝试解决我的问题

解决方案

我想这意味着您没有服务器的权限来访问网络上此计算机上的注册表.

发生此错误,因为访问注册表的帐户没有正确的用户权限.

默认情况下,ASP.NET辅助进程的用户令牌为ASPNET(或在Internet Information Services [IIS]上运行的应用程序为NetworkService).

您正在尝试访问远程系统注册表项.尝试在您的web.config文件中模拟,使用的用户在该远程系统上具有完全访问权限.
通常,在工作组环境中,您要运行代码的帐户必须存在于您要连接的所有计算机上,并且所有这些帐户必须具有相同的密码


While accessing registry from my system....I am getting error like Registry access is not Allowed..........

RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMachine, "192.168.1.5").OpenSubKey("SOFTWARE").OpenSubKey("Microsoft").OpenSubKey("Windows").OpenSubKey("CurrentVersion").OpenSubKey("Installer").OpenSubKey("UserData").OpenSubKey("S-1-5-18").OpenSubKey("Products").GetSubKeyNames()

Try to solve my problem

解决方案

I guess that means you don''t have permission from your server to access the registry on this machine on your network.


Such error occurs because the account accessing the registry does not have the correct user rights.

By default, the user token of the ASP.NET worker process is ASPNET (or NetworkService for applications that run on Internet Information Services [IIS]).

You are trying to access remote system registry key. Try impersonation in your web.config file, where the user used has full access on that remote system.
In general, In a workgroup environment, the account your code runs under must exist on all the machines you want to connect to AND all those accounts must have the same password


这篇关于不允许注册表访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆