Archived Support Site

This support site is archived. You can view the old support discussions but you cannot post new discussions.

Registering COM Objects

I have a VB6 DLL I'd prefer not to rewrite, but for it to work in ASP.NET it needs to have DllRegisterServer called (typically done with regsvr32)

My solution works locally since the DLL is registered but when pushed to AppHarbor I get:
Retrieving the COM class factory for component with CLSID {DE73C8C4-D95F-49CD-98AB-842AD40C5068} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).

My guess is you don't support this and most likely don't plan to but figured I'd ask to make sure before trying to convert the DLL to .NET

  1. You could try registration-free COM. To do this right-click the COM reference in the References node in Solution Explorer, choose Properties, and then set Isolated = True - Notice it copies the DLL and creates manifest file in the bin/ directory for your component.

    (I forget whether this works with ASP.NET apps at all. Might have been designed more for windows apps.)

  2. ...Also I'm not sure how happy your STA COM component will be being called a multi-threaded environment such as ASP.NET...

  3. Wow, that almost worked. But ended up with the error below since AppHarbor needs to recompile my code.

    I think I'm going to go with plan B and get the pieces of code I need upgraded to .NET.

    Thanks for your help! Didn't know about the "Isolated = True" option.

    Creating directory "obj\Release\".
    c:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1558,9): warning MSB3084: Task attempted to find "AxImp.exe" in two locations. 1) Under the "C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\" processor specific directory which is generated based on SdkToolsPath 2) The x86 specific directory under "C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\" which is specified by the SDKToolsPath property. You may be able to solve the problem by doing one of the following: 1) Set the "SDKToolsPath" property to the location of the Microsoft Windows SDK. [D:\temp\vfbg1djn.rub\input\AgvisorGoldMVCTest\AgvisorGoldMVCTest.csproj]
    c:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1558,9): error MSB3086: Task could not find "AxImp.exe" using the SdkToolsPath "C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\" or the registry key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A". Make sure the SdkToolsPath is set and the tool exists in the correct processor specific location under the SdkToolsPath and that the Microsoft Windows SDK is installed [D:\temp\vfbg1djn.rub\input\AgvisorGoldMVCTest\AgvisorGoldMVCTest.csproj]
    Done Building Project "D:\temp\vfbg1djn.rub\input\AgvisorGoldMVCTest\AgvisorGoldMVCTest.csproj" (default targets) -- FAILED.

  4. Yeah, getting it ported to .NET sounds like the way to go. Thanks for helping out, Duncan.

  5. friism closed this discussion on 12 Jul, 2011 08:45 PM.

Discussions are closed to public comments.
If you need help with AppHarbor please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac