Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Component Services / October 2003

Tip: Looking for answers? Try searching our database.

regsvcs: Access to registry key is denied

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rob Reesor - 13 Oct 2003 14:11 GMT
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 - 13 Oct 2003 15:20 GMT
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

>I have written a simple COM+ server application in VB.NET, following all the
>guidelines in "Writing Serviced Components" in MSDN.
[quoted text clipped - 19 lines]
>
>Any ideas?
Rob Reesor - 14 Oct 2003 08:25 GMT
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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.