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 / General / March 2008

Tip: Looking for answers? Try searching our database.

Problem registering managed component with COM

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Graham R Seach - 27 Mar 2008 21:46 GMT
Hi guys,

I'm trying to create my first real VB.NET project, a managed component, and
I seem to be having some trouble. I'm running this on my own laptop, where I
am local admin. It seems like it's a matter of permissions (see cmd message
below). I'm running VS Team Suite 2005 v8.0.50727.867, on Vista Ultimate,
and I've set the VS shortcut to [Run as Administrator].

The project is very simple; a couple of public functions, and that's all. I
inherited ServicedComponent, built the project, created the key pair (sn -k
pdb.snk), added the Assembly attribute to AssemblyInfo.vb  <Assembly:
AssemblyKeyFile("..\..\..\pdb.snk")>  , and built the project again. Then I
tried to register the component with COM (regsvcs ChatterBox.dll), and
received the following messages:

<snip>
Microsoft (R) .NET Framework Services Installation Utility Version
2.0.50727.312
Copyright (c) Microsoft Corporation.  All rights reserved.

The following installation error occurred:
1: You must have administrative credentials to perform this task. Contact
your system administrator for assistance.
2: Failed to register assembly 'ChatterBox, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=77c3f554ffee0bb9'.
3: Access to the registry key 'HKEY_CLASSES_ROOT\ChatterBox.ChatterBox' is
denied.
</snip>

Sorry if I haven't provided enough information, but if it IS a permissions
problem, as it seems to be, how can I resolve this issue?

Thanks,
Graham
EagleRed@HighFlyingBirds.com - 28 Mar 2008 22:28 GMT
You need to use some COM interoperability mechanism.  Check the topic,
"Exposing .NET Framework Components to COM" in the VS documentation.  I have
done this using  a COM Callable Wrapper.  There is another mechanism called,
Runtime Callable Wrapper.  You might look at these topics in the
documentation.

> Hi guys,
>
[quoted text clipped - 30 lines]
> Thanks,
> Graham
Graham R Seach - 31 Mar 2008 02:01 GMT
Thanks but I'm already using regsvcs, so I don't have to even think about a
CCW. It turns out that although VS was running in the Admin context, the
command prompt was not. Once I sent it to [Run as Administrator], the
problem went away. After setting the ClassInterface attribute, I can see the
library from my app and all's well with the world.

- Graham

> You need to use some COM interoperability mechanism.  Check the topic,
> "Exposing .NET Framework Components to COM" in the VS documentation.  I
[quoted text clipped - 46 lines]
>> Thanks,
>> Graham

Rate this thread:







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.