Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

regsvcs: Access to registry key is denied

87 views
Skip to first unread message

Rob Reesor

unread,
Oct 13, 2003, 9:11:49 AM10/13/03
to
I have written a simple COM+ server application in VB.NET, following all the
guidelines in "Writing Serviced Components" in MSDN.

I only access this COM+ application from another .NET application so I did
not include extra stuff for COM Interop, etc.

When registering the component using "regsvcs MyComponent.dll" I get the
errors:

1. Failed to register MyComponent.dll, ...

2. Access to registry key is denied.

This component and the .NET application that uses it works fine on several
Win XP and Win 2000 PCs, but fails on two Windows 2000 Servers I tried to
install it on.

Things I have noticed:
* the registry key it is trying to access is 'one blank space'.
* it seems to fail on Win 2000 servers with both V1.0.x.x and V1.1.x.x of
the .NET Framework installed.

Any ideas?


Slava Gurevich

unread,
Oct 13, 2003, 10:20:23 AM10/13/03
to
See if this helps.

FIX: "Access to the Registry Key Denied" Error Message When You
Register .NET Assembly for COM Interop
http://support.microsoft.com/?kbid=327507

Also make sure the latest Win2k service pack is installed.

Slava Gurevich

Rob Reesor

unread,
Oct 14, 2003, 3:25:49 AM10/14/03
to

The latest Win2k Service Pack and patches are installed (according to
the network administrator).

I also checked out the knowledge base article 327507. My problem is
different from that article in that:

* I am not using regasm, I am using regsvcs
* I am not registering a component for COM Interop
* I built everything using Visual Studio .NET 2003 (ie. Framework V1.1)
and have V1.1 of the .NET Framework installed on the Win2k servers. That
article says the problem was fixed with V1.1.
* In trying many different things, another developer noticed that the
name of the registry key with access denied is not the usual
"HKEY_CLASSES_ROOT\Component Categories\...", it is " " (one blank
space).

regsvcs displays that error message "Access to registry key (registry
key name) is denied". Looking closely at the error message we realised
there were two spaces between the words "key" and "is". This and some
other things made us realise that it was trying to access a registry key
of one blank space.


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Slava Gurevich

unread,
Oct 14, 2003, 4:35:01 AM10/14/03
to
On Tue, 14 Oct 2003 00:25:49 -0700, Rob Reesor <anon...@devdex.com>
wrote:

>
>The latest Win2k Service Pack and patches are installed (according to
>the network administrator).

Check yourself. Type winver at the command prompt. The latest for
Win2k is SP4.

>
>I also checked out the knowledge base article 327507. My problem is
>different from that article in that:
>* I am not using regasm, I am using regsvcs

You may be right, but there were 2 other people here recently with a
similar problem, which was resolved by applying the article fix.
Worth a try IMHO.


>* I am not registering a component for COM Interop

Do you derive your class from ServicedComponent ?

>* I built everything using Visual Studio .NET 2003 (ie. Framework V1.1)
>and have V1.1 of the .NET Framework installed on the Win2k servers. That
>article says the problem was fixed with V1.1.
>* In trying many different things, another developer noticed that the
>name of the registry key with access denied is not the usual
>"HKEY_CLASSES_ROOT\Component Categories\...", it is " " (one blank
>space).
>
>regsvcs displays that error message "Access to registry key (registry
>key name) is denied". Looking closely at the error message we realised
>there were two spaces between the words "key" and "is". This and some
>other things made us realise that it was trying to access a registry key
>of one blank space.

To confirm that you could capture a registry trace with the free
regmon tool from www.sysinternals.com
( it supports source filtering)

Slava Gurevich

Tomas Restrepo (MVP)

unread,
Oct 14, 2003, 1:47:47 PM10/14/03
to
Rob,

> * I am not using regasm, I am using regsvcs

True, but regsvcs does generate and register the TLBs for your .NET
components (one of the things regasm does as well). Both use the same
underlying support in the .NET framework for this.

> * I am not registering a component for COM Interop

Sure you are. That happens everytime you register a ServicedComponent (don't
believe me? Look in the registry for the component's progid)

--
Tomas Restrepo
tom...@mvps.org


0 new messages