Problem with COM interop
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngmigrate' list.


Shireesh Bhate
Hi all,

I am writing a .NET assembly to serve as a scriptable ( from ASP) COM
server. This
assembly (called Bridge.dll), will bridge the gap between the types that
ASP can=20
comfortable deal with, allowing the assembly containing the real meat of
the work=20
(called Real.dll) to express its interface in .NET types. The code for
Bridge.dll and=20
Real.dll are in the same VS.NET (RTM Enterprise Architect) solution.
Only Bridge.dll
is flagged for COM interop under the ProgID of "CWV2.Bridge".
The Bridge.dll project references the Real.dll project. =20

Enough background...

My problem is that when I run my test harness ASP page, I receive the
following problem:

Error Type:
Bridge (0x8007000B)
The format of the file 'Real' is invalid.
The JScript line causing the error is: var sm =3D
Server.CreateObject("CWV2.Bridge").
I've traced this back to probably being a BadImageFormatException, but
this doesn't make much sense
since the documentation indicates that this exception is caused by using
a non-.NET file with
the Assembly.Load function that the run-time is probably calling. None
of my dll's are COM or machine-code dlls,
all are .NET.

Has anyone run into this one before? Any other ideas? I may be
incorrect about the actual exception type, but I think that=20
the HRESULT I'm getting back on the error corresponds to the
BadImageFormatException.

Thanks in advance...

Shireesh

Reply to this message...
 
    
Shireesh Bhate
Hi all again,

Please disregard this one. I figured it out. I used fuslogvw.exe
and discovered that my problem was caused by the runtime's inability
to find the dependent .NET assembly using probing (talk about an obscure
utility).=20

The hosting executable was dllhost.exe (ASP), which ran out of System32,
and
the dependent assemblies were not in that directory, a bin subdirectory,

or the GAC. Fixed the problem using the machine.config
<runtime><developmentMode>
element to utilize a DEVPATH environment variable. Will use the GAC
when fully=20
deployed to production.

Hope this helps anyone else who runs into this problem...

Shireesh

-----Original Message-----
From: Shireesh Bhate=20
Sent: Monday, February 11, 2002 11:32 AM
To: aspngmigrate
Subject: [aspngmigrate] Problem with COM interop

Hi all,

I am writing a .NET assembly to serve as a scriptable ( from ASP) COM
server. This
assembly (called Bridge.dll), will bridge the gap between the types that
ASP can=20
comfortable deal with, allowing the assembly containing the real meat of
the work=20
(called Real.dll) to express its interface in .NET types. The code for
Bridge.dll and=20
Real.dll are in the same VS.NET (RTM Enterprise Architect) solution.
Only Bridge.dll
is flagged for COM interop under the ProgID of "CWV2.Bridge".
The Bridge.dll project references the Real.dll project. =20

Enough background...

My problem is that when I run my test harness ASP page, I receive the
following problem:

Error Type:
Bridge (0x8007000B)
The format of the file 'Real' is invalid.
The JScript line causing the error is: var sm =3D
Server.CreateObject("CWV2.Bridge").
I've traced this back to probably being a BadImageFormatException, but
this doesn't make much sense
since the documentation indicates that this exception is caused by using
a non-.NET file with
the Assembly.Load function that the run-time is probably calling. None
of my dll's are COM or machine-code dlls,
all are .NET.

Has anyone run into this one before? Any other ideas? I may be
incorrect about the actual exception type, but I think that=20
the HRESULT I'm getting back on the error corresponds to the
BadImageFormatException.

Thanks in advance...

Shireesh

| [aspngmigrate] member Click here to reveal e-mail address =3D YOUR ID
| http://www.asplists.com/asplists/aspngmigrate.asp =3D JOIN/QUIT

Reply to this message...
 
 
System.BadImageFormatException
System.Reflection.Assembly




Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com