Hi, I want to develop an ASP.NET application which will retreive the HOSTUUID from the client machine registry.Is it possible to read the HOSTUUID from the client machine.If so
1) is there any rights we need to have ?
2) How to do it ?
Please help.
-
No, this is not possible.
ASP.Net can definitely not read anything from the client registry (it is located on the server and hence can not get on to the client, let alone into the registry of the client).
Maybe it can be done through some hackery with javascript on the client side, but I doubt it will be possible, as this would be a nice opportunity for a lot of malware.Jebli : Can we do it using windows application ?is there any other way to do it ?fretje : Of course, a windows application on the client can read the local registry, as long as the user which starts the application has permission to read the registry (or that particular value in the registry).Jebli : is HOSTUUID and computer name are same ?fretje : I'm not sure what you mean with 'HOSTUUID', but I suppose not, as a UUID is an 128bit code, and a computer name is (normally) human readable.Jebli : ok i understood .we can get the UUID only from the registry . There are some ways to read the computer name, client IP etc. Like wise is it possible to read the UUID key.Sorry if i am wrong.John Saunders : Which "UUID"? What are you trying to accomplish? -
The ASP.NET code runs on the web server and has absolutely no way to access your client's machine - neither its drives nor its registry or anything else on your local client machine.
So no - you can't do that.
Marc
Jebli : Can we do it using windows application ?is there any other way to do it ?marc_s : You could possibly create an ActiveX control that would be hosted inside Internet Explorer - but even that would be a hack.marc_s : A Windows program: yes, there is a "remote registry" call mechanism that allows you to read the registry of remote machines - IF that remote machine allows it and your user has enough permissions to do so.Jebli : SO do you mean the i will be able to read the other machines registry from one system using windows application?Jebli : is HOSTUUID and computer name are same ?marc_s : @Jebli: yes, you'll be able to read a remote machine's registry **IF** that machine allows it and the user you use to do this has the necessary permissions to do it. -
You could do it with a VB6 ActiveX control.
That's going back to the big bad-arse days.
Problem is:
- It'll only work in IE
- The user experience will be truly awful (security warnings up the gazoo)
The only time I've done it, is in a nice homogeneous environment, from a trusted server. In which case, it did the job and fairly seamlessly.
Is this for licensing purposes? Knowing a bit about why you want the uuid might allow people to offer alternative suggestions for something more easily achievable.
Jebli : Yes its for licensing purpose.Is is HOSTUUID and computer name are same ?Jebli : can we read the computer name insted of Hostuuid ? -
Since these machines are on a local intranet (answered in your comments) you are better off writing a script or application to obtain this data. You could run this locally, or on another server. Using ASP.net and webpage to do this is likely impossible, as others have mentioned.
A quick google and I found this example of how to use WMI and vbscript to obtain a remote computer registries value.
From .net you can use the ManagementScope object to obtain this data.
marc_s : Yes - it's technically possible, but it requires the remote machine (where the UUID is being read from) to allow this behavior. Typically, over the internet, you won't allow just any site to read stuff from your local client PC .....Jebli : I tried it but i am getting, Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) ,DO we need any permission ?Jebli : I am getting The RPC server is unavailable. (Exception from HRESULT: 0x800706BA).What might be the issue.Please help.Mike Ohlsen : Yes, you will need permission to view this and the machine will have to be running the Remote Procedure Call (RPC) service.
0 comments:
Post a Comment