473,582 Members | 3,083 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

2 New Member
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.ma nifest
genman32 MyDotNet.dll /add /manifest:MyDotN et.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 -managedassembly name:MyDotNet.d ll -nodependency -out:MyDOTNET.ma nifest

mt.exe -manifest MyDOTNET.manife st -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.tl b 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:

<assemblyIdenti ty name="MyDOTNET" version="3.15.0 .0" type="win32" processorArchit ecture="x86" />
<description> My DOTNET Application</description>
<dependency>
<dependentAssem bly>
<assemblyIdenti ty
name="MyDotNetD LL"
version="3.15.0 .0"
publicKeyToken= "4b51aafe36029d 4a"
processorArchit ecture="x86" />
</dependentAssemb ly>
</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 5215
Bhrionn
2 New Member
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
6760
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; using Microsoft.Office; using Microsoft.Office.Interop; using Microsoft.Office.Interop.Outlook; using Microsoft.Office.Core;
12
2553
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 problem is that even when it is configured to run under a certain identity through Web.config, the impersonation is not carried through to COM library....
9
3898
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', 'Scripting', 'Scripting.FileSystemObject', and a few others However, when I try to create the fso object I keep receiving an error. 'ActiveX...
0
1302
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 domain via a popup (which it shouldn't) and then generates this customErrors error, and then when I access the page from the server itself, it still...
3
1315
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 randomly when i access my website in productin ,i get this error mentioned below but when it hit on refresh the website comesup. My website is...
0
2475
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 control. The Custom OCX is not used for visual purposes, but has some functionality that we require (hence hosting an OCX in a DLL). Everything...
8
6863
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 testing, but now that the application is deployed about 1 in every 10 computers get this error when they try to run the app. Any ideas? Everything I...
8
1185
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 deployed on the Network? and will it accommodate 200_ concurrent users? Thanks, Marcus -- Message posted via http://www.dotnetmonster.com
5
3539
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 this error. Any idea why? Server Error in '/myuser4/MyWebApp' Application....
0
7886
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8159
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7920
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6569
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5685
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5366
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
2312
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1413
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1147
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.