Jebli
Jebli

Reputation: 2825

Is it possible to read Registry Settings From The Client Machine using asp.NET

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.

Upvotes: 0

Views: 4059

Answers (4)

Mike Ohlsen
Mike Ohlsen

Reputation: 1900

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.

Upvotes: 1

davewasthere
davewasthere

Reputation: 3018

You could do it with a VB6 ActiveX control.

That's going back to the big bad-arse days.

Problem is:

  1. It'll only work in IE
  2. 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.

Upvotes: 1

marc_s
marc_s

Reputation: 755287

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

Upvotes: 5

fretje
fretje

Reputation: 8382

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.

Upvotes: 1

Related Questions