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
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.
Slava Gurevich - 14 Oct 2003 09:35 GMT
>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
[quoted text clipped - 9 lines]
>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\) - 14 Oct 2003 18:47 GMT
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)

Signature
Tomas Restrepo
tomasr@mvps.org