Discussion Locked

Help: Accessing Registry with ASP?

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi,

I'm trying to access the Registry using ASP and Javascript code. I get the following error:

"Server object error 'ASP 0177 : 800401f3'
Server.CreateObject Failed
Invalid class string "

at the following line:
var myReg = Server.CreateObject("IISSample.RegistryAccess");

What could be causing this error!?

Thanks!

5 replies

by nikki96

ASP runs on the server. Javascript runs on the client.

If you're trying to access the server's registry, use VBScript or JScript that runs on the server, not the client.
If you're trying to access the client's registry, you can try the above, but it will fail if they don't have IIS and may still fail due to security restraints. Check into HTA applications using WSH and IE as an alternative.

by t-dub

ASP has limited access rights on the machine on which it runs.

Basically, Windows won't allow direct access to the Registry from an ASP script.

You will probably need to get or build a custom COM component to do your registry access and thenaccess it from your web page using Server.CreateObject().

It would be a very simple class to build in VB6.

Or you could just go here and get it for free:
http://a1lab.com/a1asp/reg.phtml

Hope that helps...

This discussion is closed to new replies.