473,245 Members | 1,649 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,245 software developers and data experts.

RegFree COM Error for VB6 /VB.NET Interop Side by Side network deployed application!

Hello World,

I am working on implementing a build for my companies application. The scenario implemeted is producing the error:
‘Class does not support automation or does not support expected interface' when I try to run the RegFree COM interop application from a clients machine.
The application works fine for all development machines when run locally or from the network.
The application is run from the network so - the component is not registered on the clients machine for the running instance. Previous versions of the application would ,however , have been registered on the application using Regasm to register the DLL on the clients machine.
The RegFree COM application works correctly for all development machines but does not work for the customer machine.

The main application is a VB6 application using interop to reference a VB.NET dll. Some additional interop DLL's are signed and deployed to the GAC. The main application and Dot net DLL runs off the network.

The VB.NET DLL itself is implementing the RegFree COM scenario. This is implemented by:
0.) Regenerating a new signing key for the build.
1.) Building the Dot net DLL with new signing key.
2.) Generating manifest information for the DLL and embedding this into the DLL. The generation and embedding of the manifest information is done with genman32, a utiltiy from Microsoft. The official tool MT does not produce viable results on the development machines as the final build fails to start!.
The commands to generate and embed the manifest information for genman32 are:
genman32 MyDotNet.dll /out:MyDotNet.manifest
genman32 MyDotNet.dll /add /manifest:MyDotNet.manifest

I know that I should really generate and embed the manifest information with MT.exe , but this way never produces a working result on development machines!. So this may be one possible source of the issue!
For reference , the non working MT commands are:
mt.exe -managedassemblyname:MyDotNet.dll -nodependency -out:MyDOTNET.manifest

mt.exe -manifest MyDOTNET.manifest -outputresource:%MyDotNet.dll;#1

Moving on, once the DLL manifest information is extrated and embedded with genman32 , I resign the dll with:
sn -Ra MyDotNet.dll MyKey.snk

Now, I generate the type lib information with:
regam /tlb:MyDotNet.tlb MyDotnet.dll

Then, I rebuild the VB6 application with this updated typelib reference MyDotnet.tlb file. Finally, I build the VB6 application manifest which includes the reference for the VB.NET DLL containing the embedded manifest information. This is RegFree COM. The Application manifest looks like:

<assemblyIdentity name="MyDOTNET" version="" type="win32" processorArchitecture="x86" />
<description>My DOTNET Application</description>
processorArchitecture="x86" />

The reason for the RegFree COM deployment is we need VB6/VB.net Interop-ability. The DotNet/VB application must run from the network, with multiple versions. Therefore application isolation is required to reference the correct DLL found in the current application folder.

1.) Generating and embedding the manifest information with MT.exe tool does not produce a workable application after resgining and testing of the VB.NET DLL. The final build error produced when using the MT tool steps is:
"This application failed to start because the application configuration is incorrect. Reinstalling the application may fix the problem"

2.) The described implementation (using the genman32 to generate and embed manifest info) works for all development machines but not business machines. The key difference between machines is installation of the Visual Studio 2005.

This would lead me to believe that the issue is either
1.) With regard to the files (DLL's or configuration Manifests) included in VS2005. The deployment machines only have the Dot Net runtime 2.0.
2.) There is some issue with regard to the MT manifest generation and embed that needs to be addressed before correct working of the Side by Side deployment from the Network .

If there is anybody who could give me information that could help resolve this RegFree COM issue for VB6 /VB.NET interop deployment I would be very appreciative.

OS: Windows XP SP2
Compiler Technologies: VB6 , VB.NET Visual Studio 2005

Best regards,
Nov 19 '08 #1
1 5187
Regarding the MT issue. It worked today! So I can only presume my process was previously wrong.

The issue of 'Class does not support automation or does not support expected interface' was resolved by including the CASPOL command:
caspol -q -machine -addgroup 1 -url <<Network Location of Application>> FullTrust -name "MyDOTNET3.15.0"

This fixed the issue for good!

Nov 19 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

by: Aprochko | last post by:
Attempting to access outlook from C# .NET ASP app. Have added reference to COM Microsoft Outlook 11 Object Library. Have included using System.Runtime.InteropServices; using System.Web.Mail;...
by: Anil Krishnamurthy | last post by:
We have an ASP.NET application that uses COM objects through Interop. The web application requires access to network and database resources and hence, needs to impersonate a domain account. The...
by: kermit | last post by:
I keep seeing that you can use the FileSystemObject in either VB script, or Javascript on an aspx page. I added a refrence to the scrrun.dll I added importing namespaces for 'System.Object',...
by: dw | last post by:
Hi, all. I've deployed an ASP.NET 1.1 app from my localhost where it works fine to a server on the network, but when accessed from my machine through the Web, it first asks for me to log into the...
by: sameer | last post by:
Hi All, i have an asp.net application which has got sql server 2000 behind the scenes. Very simple application, all it does is extract the data from the databse and display it in the grid. But...
by: MarkD | last post by:
I have an ASP.NET (VB.NET) application that calls all VB6 COM DLL via Interop. The DLL uses functionality contained in a Custom OCX Control (Also VB6) that in turn contains a standard TreeView...
by: Ryan | last post by:
I've created and deployed a VB.Net 2005 Application. I have it set as a FullTrust (ClickOnce) application. The install point is on a network server. I did not run into this issue at all while...
by: Marcus via DotNetMonster.com | last post by:
We have 200+ concurrent users. We can't deploy on the company web/internet for 6 months due to other priority projects. We have Oracle database as the backend. Can an ASP.Net application be...
by: Cirene | last post by:
I just deployed my new ASP.NET (3.5 FW) site to the hosting company I'm using, webhost4life. NOTE: I HAVE deployed other SQL Server sites to the same account with no issues. Now I'm getting...
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.