472,985 Members | 2,815 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,985 software developers and data experts.

Why is COM in .NET not needed anymore?

Hello,

I would like to explain, why COM in-process and COM local server are
not needed in .NET anymore. Of course there are several .NET
techniques how to solve remote communication as successor of .COM
remote servers (.NET remoting, WCF communication and web services).

But the successor of COM in-process and COM local server is the simple
assembly, isn't it? The manifest of the assembly can be seen as
successor of the COM type library. There you get all the informations
about all types defined in the assembly.

Am I right?

Thank you,
Norbert
Sep 7 '08 #1
8 1688
Re remote servers, "remoting" is probably the most natural equivalent.

The biggest gap with .NET vs COM is the out-of-process local server -
with COM an out-of-process server can be lazily instantiated, but
with .NET it would have to already be running, for example as a
windows service. Fortunately, you can use "serviced
components" (enterprise services) with .NET to host an assembly
within COM+. A little more involved, but it works.

Re the type library... if you mean a standalone TLB, then I'm not sure
there really is an equivalent. In .NET the metadata is in the assembly
itself, although you can export this to COM for interop purposes.

Marc
Sep 7 '08 #2
Norbert Pürringer wrote:
Hello,

I would like to explain, why COM in-process and COM local server are
not needed in .NET anymore. Of course there are several .NET
techniques how to solve remote communication as successor of .COM
remote servers (.NET remoting, WCF communication and web services).
They got rid of COM in .Net, because COM componets such as Active X
controls are being abused, and they present serious exploit problems
that a hacker can use to exploit the computer.

COM components such as DLL(s) must be registered with the O/S, which
creates the DLL H-E-L-L issues as various versions of the same named
DLL(s) used by multiple applications break applications. With .Net
DLL(s), they can reside in the folder of its exe that uses the DLL, they
are not registered with the O/S, so multiple versions can exist on the
machine for various applications.

..Net DLL(s) such as C# and VB.Net are managed code solutions that are
controlled by the CLI and CLR.
Sep 7 '08 #3
They got rid of COM in .Net, because COM componets such as Active X
controls are being abused, *and they present serious exploit problems
that a hacker can use to exploit the computer.
I think that is a bit of an over-simplification, but yes: that was
*one* of the motivations. But COM/COM+ is still alive and well.
COM components such as DLL(s) must be registered with the O/S
Not true; there is registry-free COM

GAC hell isn't quite as bad, as it can at least host multiple
versions; in reality this isn't as useful as it sounds. But yes: it is
mcuh easier to drop assemblies in the release folder than it is to
configure registry-free COM for the same.

Marc
Sep 7 '08 #4
How can .NET replace COM local servers? The COM in process server can
be replaced by a simple assembly with its manifest. The COM remote
server can be replaced by WCF or webservices. But is there a chance to
start a .NET application from outside and to use the functions of the
current process? Excel is a local server and can be automatically
started from a COM client (visible = true), then I can call functions
of the running Excel instance. Another COM client may use the current
running Excel instance. How can that be realized in .NET using the CLR?
Sep 7 '08 #5
How can that be realized in .NET using the CLR?
By hosting in COM+ via Serviced Components

http://msdn.microsoft.com/en-us/libr...ez(VS.80).aspx

Marc
Sep 7 '08 #6
Hi Marc,
How can that be realized in .NET using the CLR?

By hosting in COM+ via Serviced Components

http://msdn.microsoft.com/en-us/libr...ez(VS.80).aspx
Very interesting. So the COM technique is not obsolete. Serviced
components in .NET are still based on COM. I thought, COM is not
needed anymore since release of .NET

Norbert

Sep 7 '08 #7
Very interesting. So the COM technique is not obsolete. Serviced
components in .NET are still based on COM. I thought, COM is not
needed anymore since release of .NET
Well, COM+. Note that interoperability with other technologies still
depends heavily on COM; not everything knows about .NET, but via COM-
interop you can write a .NET implementation of a COM API, or consume a
COM API from your .NET code. So as I already said: COM is still very
much alive and well.

Marc
Sep 7 '08 #8
Marc Gravell wrote:
>They got rid of COM in .Net, because COM componets such as Active X
controls are being abused, and they present serious exploit problems
that a hacker can use to exploit the computer.

I think that is a bit of an over-simplification, but yes: that was
*one* of the motivations. But COM/COM+ is still alive and well.
Yeah it's still alive and that's why .Net must inter-operate with the
unmanaged COM and COM+ components, because if it's not broke, then one
doesn't fix it.

However, a COM component still is and will remain to be a very dangerous
solution, as it allows a software developer/hacker to do anything once
the code is executed with the privileges of the user logged into the
machine, in an exploit situation. That would be root/admin/ rights on
Windows ME and down or they run with user-admin for the most part on
Windows NT based O/S(s) that allows COM components to do anything from
an exploit standpoint.

Now supposedly, .NET managed solutions are suppose to be looking at code
execution intent to see of the execution of code is malicious in nature.
It's most likely not bullet proof, but it's better than nothing at all
which is the present situation with COM.

That's what users are looking at now as how easily the Windows O/S
platform can be exploited in the corporate and home user sectors, due to
COM componets.
>
>COM components such as DLL(s) must be registered with the O/S

Not true; there is registry-free COM
Every COM and COM+ legacy solution I have ever developed or worked with
has had to have those DLL's registered with the O/S. What you're talking
about is new technology trying to circumvent the problems of old legacy
technology. I doubt that many COM or COM+ developers even know that it
exist. And I look at this registry-free COM thing as another security
threat on MS Windows platform.
>
GAC hell isn't quite as bad, as it can at least host multiple
versions; in reality this isn't as useful as it sounds. But yes: it is
mcuh easier to drop assemblies in the release folder than it is to
configure registry-free COM for the same.
I know, and one can have strong named assemblies without the use of GAC.
I have never used GAC for Windows WEB or Windows desktop solutions.
Sep 8 '08 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ammar T. Al-Sayegh | last post by:
Hi All, We've been using Noah's Classifieds system without any problem until we upgraded to PHP5. Now, the system doesn't work anymore. Unfortunately, the company that made this system doesn't...
4
by: Trent WADDINGTON | last post by:
I have a dll that, I'm told, has been created using MSVC 4.2. I am trying to seperate the run time library from the user written code (as part of a decompilation effort). I believe the object...
1
by: orehian | last post by:
Construct a one-time password system. · Write a server code and a client code. The server code takes as input a username and a one-time password from the client and then sends a message...
6
by: Laphan | last post by:
Hi All We've had a Fasthosts reseller account for quite a few years now and have been relatively happy until now. Unfortunately they've started to push out MySQL DBs (I think 4.2.x or 5) that...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.