I am having some very strange errors when trying to use an isolated component.
I have a windows service that uses an interop vb6 dll. In VS2008 I set the vb6 dll to isolated. Visual Studio generates all the necessary manifests. Since my service does not directly reference the com dll, it generates service.exe.manifest that contains references to other assemblies that do reference the com component. When I go to run the service, it will only work if I register the DLL on the machine. That is obviously not what I want to happen. I am getting the "No such interface supported" just as if I hadn't registered the component. I can't use sxstrace.exe since I am on XP and server 2003.
I created a small testing application that referenced the isolated dll directly instead of through other assemblies. All I did was instantiate one of the classes, but this didn't fail as it did earlier with the services. I compared the manifests generated by my test app and the service I am working on. They are identical except for assembly name.
Does anyone know why this might be happening? Is there anyway to debug to find out what's happening. I don't want to have to register the component on the production server.
I've read all the forum posts and articles I could find. There's no errors in the event log regarding the side by side activation like I've been told there should be. Did I forget to install something? The production machine as .net framework 3.5.
Here is the manifest for the service
| <?xmlversion="1.0"encoding="utf-8"?> |
| <assemblyxsi:schemaLocation="urn:schemas-microsoft-com:asm.v1assembly.adaptive.xsd"manifestVersion="1.0"xmlns:asmv1="urn:schemas-microsoft-com:asm.v1"xmlns:asmv2="urn:schemas-microsoft-com:asm.v2"xmlns:asmv3="urn:schemas-microsoft-com:asm.v3"xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"xmlns:co.v1="urn:schemas-microsoft-com:clickonce.v1"xmlns="urn:schemas-microsoft-com:asm.v1"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> |
| <assemblyIdentityname="Service.exe"version="1.0.0.0"type="win32"/> |
| <dependency> |
| <dependentAssemblyasmv2:dependencyType="install"asmv2:codebase="Native.ServiceLibrary.manifest"asmv2:size="1951"> |
| <assemblyIdentityname="Native.ServiceLibrary"version="1.0.0.0"type="win32"/> |
| <hashxmlns="urn:schemas-microsoft-com:asm.v2"> |
| <dsig:Transforms> |
| <dsig:TransformAlgorithm="urn:schemas-microsoft-com:HashTransforms.Identity"/> |
| </dsig:Transforms> |
| <dsig:DigestMethodAlgorithm="http://www.w3.org/2000/09/xmldsig#sha1"/> |
| <dsig:DigestValue>9R6hxcgGtK3vOvbE5xBL/I+dCs8=</dsig:DigestValue> |
| </hash> |
| </dependentAssembly> |
| </dependency> |
| <dependency> |
| <dependentAssemblyasmv2:dependencyType="install"asmv2:codebase="Native.BusinessObject.manifest"asmv2:size="8826"> |
| <assemblyIdentityname="Native.BusinessObject"version="1.0.0.0"type="win32"/> |
| <hashxmlns="urn:schemas-microsoft-com:asm.v2"> |
| <dsig:Transforms> |
| <dsig:TransformAlgorithm="urn:schemas-microsoft-com:HashTransforms.Identity"/> |
| </dsig:Transforms> |
| <dsig:DigestMethodAlgorithm="http://www.w3.org/2000/09/xmldsig#sha1"/> |
| <dsig:DigestValue>IUjtYMgEeil/9uUl9Dy7KphlgDM=</dsig:DigestValue> |
| </hash> |
| </dependentAssembly> |
| </dependency> |
| <dependency> |
| <dependentAssemblyasmv2:dependencyType="install"asmv2:codebase="Native.WebService.manifest"asmv2:size="1278"> |
| <assemblyIdentityname="Native.WebService"version="1.0.0.0"type="win32"/> |
| <hashxmlns="urn:schemas-microsoft-com:asm.v2"> |
| <dsig:Transforms> |
| <dsig:TransformAlgorithm="urn:schemas-microsoft-com:HashTransforms.Identity"/> |
| </dsig:Transforms> |
| <dsig:DigestMethodAlgorithm="http://www.w3.org/2000/09/xmldsig#sha1"/> |
| <dsig:DigestValue>HjdAo0XQ1iOtzpDVk6XERI3D1Gg=</dsig:DigestValue> |
| </hash> |
| </dependentAssembly> |
| </dependency> |
| </assembly> |
And here is the manifest of the assembly that actually contains the reference of the COM component. This is IDENTICAL save assembly name to my little test app that worked
| <?xmlversion="1.0"encoding="utf-8"?> |
| <assemblyxsi:schemaLocation="urn:schemas-microsoft-com:asm.v1assembly.adaptive.xsd"manifestVersion="1.0"xmlns:asmv1="urn:schemas-microsoft-com:asm.v1"xmlns:asmv2="urn:schemas-microsoft-com:asm.v2"xmlns:asmv3="urn:schemas-microsoft-com:asm.v3"xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"xmlns:co.v1="urn:schemas-microsoft-com:clickonce.v1"xmlns="urn:schemas-microsoft-com:asm.v1"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> |
| <assemblyIdentityname="Native.BusinessObject"version="1.0.0.0"type="win32"/> |
| <filename="vb6Component.dll"asmv2:size="9900032"> |
| <hashxmlns="urn:schemas-microsoft-com:asm.v2"> |
| <dsig:Transforms> |
| <dsig:TransformAlgorithm="urn:schemas-microsoft-com:HashTransforms.Identity"/> |
| </dsig:Transforms> |
| <dsig:DigestMethodAlgorithm="http://www.w3.org/2000/09/xmldsig#sha1"/> |
| <dsig:DigestValue>ImxPXo252XIWm9uMe3jJTyWRKmQ=</dsig:DigestValue> |
| </hash> |
| <typelibtlbid="{4df18f65-5af1-40f0-b10b-45ac3d330567}"version="1.0"helpdir=""resourceid="0"flags="HASDISKIMAGE"/> |
| <comClassclsid="{4770821c-caee-4c4a-8234-6d43b2072c08}"tlbid="{4df18f65-5af1-40f0-b10b-45ac3d330567}"progid="class1"/> |
| <comClassclsid="{2e37ea2c-ee70-4698-a562-4ec7bf1f408c}"tlbid="{4df18f65-5af1-40f0-b10b-45ac3d330567}"progid="class2"/> |
| </file> |
| </assembly> |
I have changed the name of the assemblies and removed some of the classes for brevity. And just for reference, the windows service calls the ServiceLibrary assembly which calls the WebService assembly which callse the BusinessObject assembly which calls the vb6 COM component. The WebService assembly is not actually a web service, it's just a regular .net assembly that was named poorly.
Thanks