com object will not read registry when com object called from asp (vb works fine) 
Author Message
 com object will not read registry when com object called from asp (vb works fine)

I've created a COM object (VB activeX dll) to basically read/write the
registry.

just some code i got from microsoft, and wrapped it up.

..

when i create a new VB project, reference the COM object, and use it...it
works fine.  no problems.

..

when i create the COM object, try to instantiate it with an .asp page, i get
a

'HKEY_LOCAL_MACHINE\SOFTWARE\myCompany\myApplication\1.0'
ValueName='myValue' does not exist.

which is an error i raise myself in the COM object.  but the key/value is
there in the registry.  (by the way, i'm using my own computer as both the
server and client right now, i understand the difference between
instantiating an object on the server and on the client)

i'm not sure why the asp won't work.  i've written other server side COM
objects that create files, create directories, delete files, etc with no
problem.  the problem seems isolated to reading the registry.

i'll give you the code...and will post it if i dont receive something off
the bat.  i thought maybe somebody might have already been through this.

..

sloan



Sun, 04 Jan 2004 03:04:05 GMT  
 com object will not read registry when com object called from asp (vb works fine)
The context in which the COM object runs, the IUSR_machinename account does
not have permission to read the registry.

Quote:

> I've created a COM object (VB activeX dll) to basically read/write the
> registry.

> just some code i got from microsoft, and wrapped it up.

> ..

> when i create a new VB project, reference the COM object, and use it...it
> works fine.  no problems.

> ..

> when i create the COM object, try to instantiate it with an .asp page, i
get
> a

> 'HKEY_LOCAL_MACHINE\SOFTWARE\myCompany\myApplication\1.0'
> ValueName='myValue' does not exist.

> which is an error i raise myself in the COM object.  but the key/value is
> there in the registry.  (by the way, i'm using my own computer as both the
> server and client right now, i understand the difference between
> instantiating an object on the server and on the client)

> i'm not sure why the asp won't work.  i've written other server side COM
> objects that create files, create directories, delete files, etc with no
> problem.  the problem seems isolated to reading the registry.

> i'll give you the code...and will post it if i dont receive something off
> the bat.  i thought maybe somebody might have already been through this.

> ..

> sloan




Sun, 04 Jan 2004 03:47:03 GMT  
 com object will not read registry when com object called from asp (vb works fine)
Ensure you open the registry for read-only access.  If you use the "all
access" method then you'll probably get access denied 'cos IUSE_<machine> or
IWAM_<machine> probably does not have the appropriate permissions to
modify/delete reg keys.

ie KEY_QUERY_VALUE | KEY_ENUMERATE_SUB_KEYS and not KEY_ALL_ACCESS.

Ed.

Quote:

> I've created a COM object (VB activeX dll) to basically read/write the
> registry.

> just some code i got from microsoft, and wrapped it up.

> ..

> when i create a new VB project, reference the COM object, and use it...it
> works fine.  no problems.

> ..

> when i create the COM object, try to instantiate it with an .asp page, i
get
> a

> 'HKEY_LOCAL_MACHINE\SOFTWARE\myCompany\myApplication\1.0'
> ValueName='myValue' does not exist.

> which is an error i raise myself in the COM object.  but the key/value is
> there in the registry.  (by the way, i'm using my own computer as both the
> server and client right now, i understand the difference between
> instantiating an object on the server and on the client)

> i'm not sure why the asp won't work.  i've written other server side COM
> objects that create files, create directories, delete files, etc with no
> problem.  the problem seems isolated to reading the registry.

> i'll give you the code...and will post it if i dont receive something off
> the bat.  i thought maybe somebody might have already been through this.

> ..

> sloan




Mon, 05 Jan 2004 01:30:29 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Call VB DLL or COM object from within VB COM object or EXE

2. COM-Object in ASP with COM-Object as parameter

3. COM-Object in ASP with COM-Object as Parameter

4. Stepping into a VB COM object called from ASP

5. Returning an object with sub objects from vb component (COM) to ASP

6. Access a COM object of a COM object?

7. Accessing a COM object of a COM object

8. COM Object-Out of stack space on executing/shell exe from com object

9. COM works fine then does not return results?

10. Need to Access ASP Session Objects from External COM Object

11. Error Trapping a COM call to MSWord object from ASP

12. Calling a COM object in ASP

 

 
Powered by phpBB® Forum Software