Re: Problem registering managed component with COM

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

"EagleRed [at] HighFlyingBirds.com"
<EagleRedHighFlyingBirdscom [at] discussions.microsoft.com> wrote in message
news:109EE1B2-F22C-48E3-9D6D-DBFCC71060B0 [at] microsoft.com...
> 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.
>
> "Graham R Seach" wrote:
>
>> 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
>>
Graham R Seach [ Mo, 31 März 2008 03:01 ] [ ID #1932453 ]
Microsoft » microsoft.public.dotnet.general » Re: Problem registering managed component with COM

Vorheriges Thema: Internet connection detection
Nächstes Thema: Linkbutton firing every other time issue