How to handle an ASP.NET app with both old COM and .NET?

G

Guest

Hi,
I have a ASP.NET application that uses both old COM.dlls and new .NET assemblies.
The .NET ones are added as references and compiled into the \bin directory.
The COM ones are also added as references and compiled into the \bin directory as Interop dlls.
On the server where I want to deploy my application resides an old ASP app that uses the same COM dll as my app and is therefore registered in Component Services. What will happen if (when...) they build a new COM dll and register it in Component Services? Since my app refers to the Interop dll in my \bin directory, I guess the CLSID will be different and my app will not work. Do I have to recompile my .NET application every time a new COM is built or is there another way round this?
Thanks in advance,
Jessica
 
K

Kevin Spencer

You would have to rebuild your InterOp assembly. Not your entire app.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

msyez said:
Hi,
I have a ASP.NET application that uses both old COM.dlls and new .NET assemblies.
The .NET ones are added as references and compiled into the \bin directory.
The COM ones are also added as references and compiled into the \bin directory as Interop dlls.
On the server where I want to deploy my application resides an old ASP app
that uses the same COM dll as my app and is therefore registered in
Component Services. What will happen if (when...) they build a new COM dll
and register it in Component Services? Since my app refers to the Interop
dll in my \bin directory, I guess the CLSID will be different and my app
will not work. Do I have to recompile my .NET application every time a new
COM is built or is there another way round this?
 
G

Guest

Hi
my Interop assembly is automatically created when I build my web solution and placed in bin
I've never compiled it myself since I don't have the source code, just the com dll added as a reference
when it is a reference it is shown under its real name Address_Business, but it results in bin as Interop.Adress_Business.dll with a different version number than the original .dll. So how can you compile only the Interop in this case

Regards, Jessic


----- Kevin Spencer wrote: ----

You would have to rebuild your InterOp assembly. Not your entire app

--
HTH
Kevin Spence
..Net Develope
Microsoft MV
Big things are made u
of lots of little things

msyez said:
Hi
I have a ASP.NET application that uses both old COM.dlls and new .NE assemblies
The .NET ones are added as references and compiled into the \bi directory
The COM ones are also added as references and compiled into the \bi directory as Interop dlls
On the server where I want to deploy my application resides an old ASP ap
that uses the same COM dll as my app and is therefore registered i
Component Services. What will happen if (when...) they build a new COM dl
and register it in Component Services? Since my app refers to the Intero
dll in my \bin directory, I guess the CLSID will be different and my ap
will not work. Do I have to recompile my .NET application every time a ne
COM is built or is there another way round this
 
K

Kevin Spencer

If you're using Visual Studio.Net (it sounds like you are), the easiest way
would be to remove the current Interop DLL from the project and create a new
one by creating a new reference to the new COM object.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

msyez said:
Hi,
my Interop assembly is automatically created when I build my web solution and placed in bin.
I've never compiled it myself since I don't have the source code, just the com dll added as a reference.
when it is a reference it is shown under its real name Address_Business,
but it results in bin as Interop.Adress_Business.dll with a different
version number than the original .dll. So how can you compile only the
Interop in this case?
 
T

teckstore

msyez said:
Hi,
I have a ASP.NET application that uses both old COM.dlls and new .NET assemblies.
The .NET ones are added as references and compiled into the \bin directory.
The COM ones are also added as references and compiled into the \bin directory as Interop dlls.
On the server where I want to deploy my application resides an old ASP app that uses the same COM dll as my app and is therefore registered in Component Services.
What will happen if (when...) they build a new COM dll and register
it in Component Services? Since my app refers to the Interop dll in my
\bin directory, I guess the CLSID will be different and my app will
not work. Do I have to recompile my .NET application every time a new
COM is built or is there another way round this?
Thanks in advance,
Jessica

Hi Jessica
How r u doing?

1)If the the com dll is new one, a newly created one from scratch then
u will not have any problems as u r not using it.

2)If the COM dll is newly compiled with changes and is binary
compatible the CLSID will not change and ur application will still be
able to work fine . When u make a reference to a COM dll in .NET ,
..Net creates a wrapper over it and copies it in bin directory and
assumes that the COM DLL will registered where ever the app. will be
deployed. Now if u want to take the advantage of new changes(new
functions) in the COM Dll then will have to take refernce to it again
and compile the .NET project, if not then u r fine.

3)If the COM dll is newly compiled with changes and is not binary
compatible then u r in trouble , bcos the compilation will change
CLSID. Here u will have to take refernce to the COM Dll recompile ur
..net project every time if the COM component is compiled.

Hope this may help!

KT
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top