ASP.NET page calls COM object, how to stop AppDomain to upgrade COM DLL ?

D

Dan

We have a simple ASP.NET page that calls through Interop to a C++ COM DLL.
I'm wondering what is the best way to manage the need to periodically update
the COM DLL version -- hopefully without stopping the web server.

In classic ASP, one way to accomplish this is to define the web application
to run in High Isolation mode. This causes it to run in its own process,
and a package is defined in COM+ component services (Win 2000). You can
then "shutdown" the application in Component Services, replace the COM DLL,
and all is well.

My understanding is that in ASP.NET, the isolation mode settings are ignored
for .aspx pages. All requests are serviced in the aspnet_wp.exe process.
An App Domain is created to support the isolation needs for each web
application. But...the COM object is created in this process, and the file
is not released. (I've made sure to even call Marshal.ReleaseCOMObject( )
to try to force the file to be freed.) I think an additional reason the DLL
file is held in the process space is to read the type library contained in
the DLL.

Given this setup in ASP.NET, how can I stop the AppDomain (?) or otherwise
free up the COM DLL to be replaced....without stopping the server?

Any thoughts are greatly appreciated.
 

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

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top