Three-tier .net web applications questions

A

Adam White

The company I work for used to create web applications using an ASP
user interface, VB6 COM+ middle-tier with a SQL2K back-end. They have
recently moved on to .NET with ASP.NET user interfaces and a C# COM+
middle-tier. The .NET applications are being installed on the same
servers as the old applications and they are also using some of the
same VB6 COM+ objects (via Interop).

The problems we are having are as follows:

1) The web applications seem to require a local copy of the COM+
object in order to run. This means that whenever I recompile the COM+
object I need to copy it to the web server as well as the COM+ server,
which seems like unnecessary work.

2) Is there an easy way to use non .NET COM+ objects with a .NET web
application? At the moment we are referencing them using Interop which
works but seems to require that they are all copied locally.
Unfortunately this means that whenever a change is made to one of the
old COM+ objects I have to recompile and re-install all of our .NET
applications, otherwise the version they are looking for is different
to the one on the COM server. Does anyone know the correct way to use
VB6 COM+ objects with ASP.NET web applications?

3) We seem to need to export new application proxies for our .NET COM+
objects even when the interface hasn't changed, why is this?

Any help or advice would be appreciated.

Cheers
 
M

Mark Rae

Any help or advice would be appreciated.

Have you thought of removing COM+ from the equation entirely and replacing
its functionality with fully managed .NET webservices...?
 
A

Adam White

We haven't looked at web services as a solution yet because we are
more concerned with sticking to the three-tier architecture we have
been using for years. Does anyone know how to fix the problems i am
having?
 
M

Mark Rae

We haven't looked at web services as a solution yet because we are
more concerned with sticking to the three-tier architecture we have
been using for years.

???

The webservices replace your COM+ tier in its entirety i.e. they become the
middle tier. You still have three-tier architecture...
 
A

Adam White

The webservices replace your COM+ tier in its entirety i.e. they become the
middle tier. You still have three-tier architecture...

OK. Fair comment. Does this mean that Microsoft intend that COM+ be
replaced by web services in the future. Do they now recommend that
developers creating systems using .NET stop using a COM+ middle tier
and start using web services or is COM+ still a viable and perfectly
acceptable option?
 
M

Mark Rae

Adam White said:
OK. Fair comment. Does this mean that Microsoft intend that COM+ be
replaced by web services in the future. Do they now recommend that
developers creating systems using .NET stop using a COM+ middle tier
and start using web services or is COM+ still a viable and perfectly
acceptable option?

Depends who you talk to...!

http://www.fawcette.com/archives/premier/mgznarch/xml/2000/04fal00/sj0004/sj0004.asp
http://www.dotnet247.com/247reference/msgs/55/276376.aspx

In my view, yes... COM+ is unmanaged, hence the need for InterOp, so...
 
K

Kevin Spencer

Actually, whether you need to re-write your COM+ DLLs as Web Services or as
Class Libraries is not determined as of yet. If your current DLLs don't need
to be marshalled across a network, you should go with Class Libraries. If
you are writing a distributed application, Web Services or Remoting might be
called for. The chief problem with Web Services and Remoting is latency. It
takes quite a bit of processing to create a SOAP envelope and serialize data
into it, etc. And as long as the objects are not needed outside the local
server's memory space, there's no need to go beyond a Class Library.

At any rate, I would have to agree that using COM in a .Net app is almost
always the wrong idea.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living
 
A

Adam White

If I use a web service it will remove the problems associated with the
DCOM side of COM+ that I am having (i.e. running on a separate
machine)
but I still want to use the functions I have in COM+. Am I right to
assume that I could use a web service but register the .net dll in
COM+ so that the ASP.Net will call the web service which will run its
functions under COM+? (I hope I am being clear!!)
 
M

Mark Rae

If I use a web service it will remove the problems associated with the
DCOM side of COM+ that I am having (i.e. running on a separate
machine)
but I still want to use the functions I have in COM+. Am I right to
assume that I could use a web service but register the .net dll in
COM+ so that the ASP.Net will call the web service which will run its
functions under COM+? (I hope I am being clear!!)

I rather fear you're missing the point completely...

1) .NET webservices are totally managed code, which run on an IIS web server

2) They can be used by pretty much any client - WinForms, WebForms etc

3) Their functions don't run "under COM+", whatever that means - they run in
the .NET Framework, just like all other managed code

4) Once you've written your webservice and deployed it on a web server,
using it in Visual Studio.NET is simply a matter of adding a reference to
it - VS.NET totally abstracts all of the SOAP stuff going on behind the
scenes for you...

I'd suggest having a look at this site:
http://aspnet.4guysfromrolla.com/articles/100803-1.aspx - start at Part 1
and work right through to the end...
 
M

Mark Rae

If I use a web service it will remove the problems associated with the
DCOM side of COM+ that I am having (i.e. running on a separate
machine)
but I still want to use the functions I have in COM+. Am I right to
assume that I could use a web service but register the .net dll in
COM+ so that the ASP.Net will call the web service which will run its
functions under COM+? (I hope I am being clear!!)

I rather fear you're missing the point completely...

1) .NET webservices are totally managed code, which run on an IIS web server

2) They can be used by pretty much any client - WinForms, WebForms etc

3) Their functions don't run "under COM+", whatever that means - they run in
the .NET Framework, just like all other managed code

4) Once you've written your webservice and deployed it on a web server,
using it in Visual Studio.NET is simply a matter of adding a reference to
it - VS.NET totally abstracts all of the SOAP stuff going on behind the
scenes for you...

I'd suggest having a look at this site:
http://aspnet.4guysfromrolla.com/articles/100803-1.aspx - start at Part 1
and work right through to the end...
 
J

Joerg Jooss

Adam said:
If I use a web service it will remove the problems associated with the
DCOM side of COM+ that I am having (i.e. running on a separate
machine)
but I still want to use the functions I have in COM+. Am I right to
assume that I could use a web service but register the .net dll in
COM+ so that the ASP.Net will call the web service which will run its
functions under COM+? (I hope I am being clear!!)

If the question is if you can hide a COM+ service behind a web service
facade, the answer is certainly yes.

Cheers,
 

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

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top