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 Posted by duncans on 12 Jul, 2011 07:20 PM
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 Posted by duncans on 12 Jul, 2011 07:21 PM
...Also I'm not sure how happy your STA COM component will be being called a multi-threaded environment such as ASP.NET...
#3 Posted by cdeutsch on 12 Jul, 2011 08:30 PM
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 Posted by friism Support staff on 12 Jul, 2011 08:45 PM
Yeah, getting it ported to .NET sounds like the way to go. Thanks for helping out, Duncan.
friism closed this discussion on 12 Jul, 2011 08:45 PM.