473,387 Members | 1,569 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,387 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.


<Scenario>
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="3.15.0.0" type="win32" processorArchitecture="x86" />
<description>My DOTNET Application</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
name="MyDotNetDLL"
version="3.15.0.0"
publicKeyToken="4b51aafe36029d4a"
processorArchitecture="x86" />
</dependentAssembly>
</dependency>



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.


Issues:
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.
Or
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,
Brian
Nov 19 '08 #1
1 5198
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!

Brian
Nov 19 '08 #2

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

Similar topics

2
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;...
12
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...
9
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',...
0
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...
3
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...
0
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...
8
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...
8
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...
5
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.