如何使用带有C#的ASP.Net编写和读取客户端Windows注册表? [英] How to write and read Client Windows registry using ASP.Net with C# ?

查看:102
本文介绍了如何使用带有C#的ASP.Net编写和读取客户端Windows注册表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有人,



请帮助我使用带有C#的ASP.Net来编写和阅读客户端Windows注册表。我已经完成了应用程序,但它只是在Server windows注册表中编写和读取托管的应用程序。有人请帮助我。



最好的问候,



Fuad

Dear All,

Please help me to write and read Client Windows registry using ASP.Net with C#. Already i did the application,but it is writing and reading from Server windows registry only which application is hosted. Anyone please help me.

Best Regards,

Fuad

推荐答案

Web应用程序/站点无法访问客户端系统(顺便说一句,对HTTP服务器主机系统的访问非常有限)。特别是对系统注册表。您自己想一想:如果可以进行此类访问,您如何信任您的系统到Web?



-SA
Web applications/sites don't have access to client systems (and, just by the way, very limited access to the system of the HTTP server hosts). Especially to the system registry. Think by yourself: if such access was possible, how could you trust your systems to the Web?

—SA






我认为由于ASP.Net代码的安全原因,不允许读写Windows注册表。

限制对特定用户的访问权限可以更好地保存服务器中的数据并在验证时读取。可能会想到基于cookie的方法。





谢谢
Hi,

I don't think reading and writing to windows registry is allowed due to security reasons from a ASP.Net code.
To limit access to specific users better save data in server and read when authenticated. May be think of a cookie based approach.


Thanks


RegistryKey objRk = Registry.LocalMachine.OpenSubKey("SOFTWARE").OpenSubKey("VCR");
           cs = objRk.GetValue("db").ToString();


这篇关于如何使用带有C#的ASP.Net编写和读取客户端Windows注册表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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