legacy COM in asp.net

S

Scott

We created several COM objects with ATL and VC++ 5.0. They have run
for a couple of years under our old Win2k IIS 5.0. Should they be
expected to work without revision in the newer asp.net?

Thanks in advance
 
J

John Saunders [MVP]

Mr. Arnold said:

That article is rather old. In particular, it seems to have been written
before Visual Studio.NET was released. You can do most of what it talks
about by using the Add Reference command and using the COM tab to select
your installed COM component.

In addition, the article does not mention issues with threading (they may
not have been widely known in 2000, which I think was before .NET 1.0 Beta
1).

ASP.NET handles each request on a different thread pool thread. If two
requests arrive at the same time for pages that use your COM component, then
two instances of your component may be accessed simultaneously. This may
well work if you have no shared state between instances of the component.
However, if you haven't tested in a multi-threaded environment before (on
multiple-CPU systems), then this will be the first time your COM component
has seen such use, and it may be the first time it has the opportunity to
fail for that reason.

Also, beware of using a single instance of the component stored in Session
or Application state, or in static variables. In this case, the single
instance will be called from multiple threads, making it even more likely
that it will fail if it wasn't built for that.
 

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