473,654 Members | 3,096 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

.Net Advertising as DCOM

Hi,

I have a situation where I need to register a COM/COM+ object that I have
written in C# as DCOM.

I have no problems creating COM or COM+ classes using C#, but I have not
been successful in trying to create a class that is accessible through DCOM.

Is anyone able to help me with this one.

Thanks
Paul
Jul 21 '05 #1
8 2301
Paul van't Klooster wrote:
Hi,

I have a situation where I need to register a COM/COM+ object that I have
written in C# as DCOM.

I have no problems creating COM or COM+ classes using C#, but I have not
been successful in trying to create a class that is accessible through
DCOM.

Is anyone able to help me with this one.

Thanks
Paul


DCOM ?

You should be using Web Services 2.0

--
w:4

Jul 21 '05 #2
Perhaps you could give an example of a component you've created and the
exact problems you've been had attempting to access it through DCOM.

--
Rob Windsor [MVP-VB]
G6 Consulting
Toronto, Canada
"Paul van't Klooster" <pa************ ***@nz.unisys.c om> wrote in message
news:ca******** **@si05.rsvl.un isys.com...
Hi,

I have a situation where I need to register a COM/COM+ object that I have
written in C# as DCOM.

I have no problems creating COM or COM+ classes using C#, but I have not
been successful in trying to create a class that is accessible through DCOM.
Is anyone able to help me with this one.

Thanks
Paul

Jul 21 '05 #3

"Benjamin Disraeli" <ni********@cen tury.fox> wrote in message
news:15******** ********@news.w est.earthlink.n et...
Paul van't Klooster wrote:
Hi,

I have a situation where I need to register a COM/COM+ object that I have written in C# as DCOM.

I have no problems creating COM or COM+ classes using C#, but I have not
been successful in trying to create a class that is accessible through
DCOM.

Is anyone able to help me with this one.

Thanks
Paul


DCOM ?

You should be using Web Services 2.0

--
w:4


Actually Web Services is probably not what Paul wants. His desire to use
DCOM implies that he wants to be able to access objects on a remote machine
which Web Services cannot do. The .NET specific technology that may be an
alternative would be Remoting.

--
Rob Windsor [MVP-VB]
G6 Consulting
Toronto, Canada
Jul 21 '05 #4
Hi,
Simply develop COM+ object and register it with server aplication (not
library aplication). After that you shoul be able to access it over DCOM.

-Valery.
http://www.harper.no/valery

"Paul van't Klooster" <pa************ ***@nz.unisys.c om> wrote in message
news:ca******** **@si05.rsvl.un isys.com...
Hi,

I have a situation where I need to register a COM/COM+ object that I have
written in C# as DCOM.

I have no problems creating COM or COM+ classes using C#, but I have not
been successful in trying to create a class that is accessible through
DCOM.

Is anyone able to help me with this one.

Thanks
Paul

Jul 21 '05 #5
Yeah, i was trying to create an object for a legacy application who's
scripting language can only access DCOM objects, so remoting is not really
an option either.

Thanks for your help though.

Paul

"Rob Windsor [MVP]" <rw******@NO.MO RE.SPAM.bigfoot .com> wrote in message
news:OZ******** *****@TK2MSFTNG P11.phx.gbl...

"Benjamin Disraeli" <ni********@cen tury.fox> wrote in message
news:15******** ********@news.w est.earthlink.n et...
Paul van't Klooster wrote:
Hi,

I have a situation where I need to register a COM/COM+ object that I have written in C# as DCOM.

I have no problems creating COM or COM+ classes using C#, but I have not been successful in trying to create a class that is accessible through
DCOM.

Is anyone able to help me with this one.

Thanks
Paul
DCOM ?

You should be using Web Services 2.0

--
w:4


Actually Web Services is probably not what Paul wants. His desire to use
DCOM implies that he wants to be able to access objects on a remote

machine which Web Services cannot do. The .NET specific technology that may be an
alternative would be Remoting.

--
Rob Windsor [MVP-VB]
G6 Consulting
Toronto, Canada

Jul 21 '05 #6
The main problem that I am having is that after registering the COM+ object,
I cannot seem to see it in the list of objects that is being displayed when
you run DCOMCNFG.

I am developing this object for a third party, and they say that I must be
able to see it in DCOMCNFG for them to be able to use it, the sample code is
below:

using System;
using System.Runtime. InteropServices ;
using System.Enterpri seServices;

[assembly: AssemblyTitle(" ComDemo")]
[assembly: AssemblyDescrip tion("")]
[assembly: AssemblyConfigu ration("")]
[assembly: AssemblyCompany ("")]
[assembly: AssemblyProduct ("")]
[assembly: AssemblyCopyrig ht("")]
[assembly: AssemblyTradema rk("")]
[assembly: AssemblyCulture ("")]
[assembly: AssemblyVersion ("1.0.*")]
[assembly: AssemblyDelaySi gn(false)]
[assembly: AssemblyKeyFile ("..\\..\\comke y.snk")]
[assembly: AssemblyKeyName ("")]
[assembly: ApplicationName ("ComDemo")]
[assembly: Description("A coms demo")]
[assembly: ApplicationActi vation(Activati onOption.Server )]

namespace ComDemo
{

public interface IComDemo
{
void AddItem(int iIn, ref String sOut, ref int iOut, ref int
iResult);
}

/// <summary>
/// Summary description for Class1.
/// </summary>
public class ComDemo : ServicedCompone nt
{
public void AddItem(int iIn, ref String sOut, ref int iOut, ref int
iResult)
{
sOut = "Bob the builder";
iOut = iIn++;
iResult = 6401;
}

}
}

Once compiled, i use the regsvcs util to register it with COM+.

Thanks for your help.

Paul

"Rob Windsor [MVP]" <rw******@NO.MO RE.SPAM.bigfoot .com> wrote in message
news:ey******** ******@TK2MSFTN GP12.phx.gbl...
Perhaps you could give an example of a component you've created and the
exact problems you've been had attempting to access it through DCOM.

--
Rob Windsor [MVP-VB]
G6 Consulting
Toronto, Canada
"Paul van't Klooster" <pa************ ***@nz.unisys.c om> wrote in message
news:ca******** **@si05.rsvl.un isys.com...
Hi,

I have a situation where I need to register a COM/COM+ object that I have written in C# as DCOM.

I have no problems creating COM or COM+ classes using C#, but I have not
been successful in trying to create a class that is accessible through

DCOM.

Is anyone able to help me with this one.

Thanks
Paul


Jul 21 '05 #7
In you project properties under Configuration Properties|Buil d make sure
that Register for COM Interop is checked or use the regasm command line
utility to do the same manually.

--
Rob Windsor [MVP-VB]
G6 Consulting
Toronto, Canada
"Paul van't Klooster" <pa************ ***@nz.unisys.c om> wrote in message
news:ca******** ***@si05.rsvl.u nisys.com...
The main problem that I am having is that after registering the COM+ object, I cannot seem to see it in the list of objects that is being displayed when you run DCOMCNFG.

I am developing this object for a third party, and they say that I must be
able to see it in DCOMCNFG for them to be able to use it, the sample code is below:

using System;
using System.Runtime. InteropServices ;
using System.Enterpri seServices;

[assembly: AssemblyTitle(" ComDemo")]
[assembly: AssemblyDescrip tion("")]
[assembly: AssemblyConfigu ration("")]
[assembly: AssemblyCompany ("")]
[assembly: AssemblyProduct ("")]
[assembly: AssemblyCopyrig ht("")]
[assembly: AssemblyTradema rk("")]
[assembly: AssemblyCulture ("")]
[assembly: AssemblyVersion ("1.0.*")]
[assembly: AssemblyDelaySi gn(false)]
[assembly: AssemblyKeyFile ("..\\..\\comke y.snk")]
[assembly: AssemblyKeyName ("")]
[assembly: ApplicationName ("ComDemo")]
[assembly: Description("A coms demo")]
[assembly: ApplicationActi vation(Activati onOption.Server )]

namespace ComDemo
{

public interface IComDemo
{
void AddItem(int iIn, ref String sOut, ref int iOut, ref int
iResult);
}

/// <summary>
/// Summary description for Class1.
/// </summary>
public class ComDemo : ServicedCompone nt
{
public void AddItem(int iIn, ref String sOut, ref int iOut, ref int iResult)
{
sOut = "Bob the builder";
iOut = iIn++;
iResult = 6401;
}

}
}

Once compiled, i use the regsvcs util to register it with COM+.

Thanks for your help.

Paul

"Rob Windsor [MVP]" <rw******@NO.MO RE.SPAM.bigfoot .com> wrote in message
news:ey******** ******@TK2MSFTN GP12.phx.gbl...
Perhaps you could give an example of a component you've created and the
exact problems you've been had attempting to access it through DCOM.

--
Rob Windsor [MVP-VB]
G6 Consulting
Toronto, Canada
"Paul van't Klooster" <pa************ ***@nz.unisys.c om> wrote in message
news:ca******** **@si05.rsvl.un isys.com...
Hi,

I have a situation where I need to register a COM/COM+ object that I have written in C# as DCOM.

I have no problems creating COM or COM+ classes using C#, but I have not been successful in trying to create a class that is accessible through

DCOM.

Is anyone able to help me with this one.

Thanks
Paul



Jul 21 '05 #8
Hi,
If you run type DCOMCnfg in cmd.exe on WXP or W2K3 it will start you
Component Services console (COM+). DCOMCnfg and COM+ administration consolle
are different thingies only on W2K (NT4 doesn't support for COM+).
DCOMCnfg's main purpose is to configure security and activation options for
DCOM outproc servers, COM+ components use Component Services console for
that matter.
If they say that they need it to be visible from DCOMCnfg for being
accessible through DCOM - tell them that they wrong. COM+ server application
does it very nice too. Following pseudocode should do it great:

[assembly: AssemblyKeyFile ("..\\..\\KeyFi le.snk")]
[assembly: ApplicationName ("DCOMDemo")]
[assembly: ApplicationID(" 12345678-0123-4321-1234-0123456789AB")]
[assembly: ApplicationAcce ssControl(true)]
[assembly: ApplicationActi vation(Activati onOption.Server )]

[GuidAttribute(" 01234567-0123-4321-1234-0123456789AB")]
public interface IDCOMDemo
{
[DispId(1)]
string SayHello(string Name);
}

[GuidAttribute(" 76543210-0123-4321-1234-0123456789AB")]
[ClassInterface( ClassInterfaceT ype.None)]
public class DCOMDemo: ServicedCompone nt, IDCOMDemo
{
string IDCOMDemo.SayHe llo(string Name) {
return "Hello " + Name;
}
};

-Valery.
http://www.harper.no/valery

DCOMCnfg is not necessary for only W. COM+ security is registered
"Paul van't Klooster" <pa************ ***@nz.unisys.c om> wrote in message
news:ca******** ***@si05.rsvl.u nisys.com...
The main problem that I am having is that after registering the COM+
object,
I cannot seem to see it in the list of objects that is being displayed
when
you run DCOMCNFG.

I am developing this object for a third party, and they say that I must be
able to see it in DCOMCNFG for them to be able to use it, the sample code
is
below:

using System;
using System.Runtime. InteropServices ;
using System.Enterpri seServices;

[assembly: AssemblyTitle(" ComDemo")]
[assembly: AssemblyDescrip tion("")]
[assembly: AssemblyConfigu ration("")]
[assembly: AssemblyCompany ("")]
[assembly: AssemblyProduct ("")]
[assembly: AssemblyCopyrig ht("")]
[assembly: AssemblyTradema rk("")]
[assembly: AssemblyCulture ("")]
[assembly: AssemblyVersion ("1.0.*")]
[assembly: AssemblyDelaySi gn(false)]
[assembly: AssemblyKeyFile ("..\\..\\comke y.snk")]
[assembly: AssemblyKeyName ("")]
[assembly: ApplicationName ("ComDemo")]
[assembly: Description("A coms demo")]
[assembly: ApplicationActi vation(Activati onOption.Server )]

namespace ComDemo
{

public interface IComDemo
{
void AddItem(int iIn, ref String sOut, ref int iOut, ref int
iResult);
}

/// <summary>
/// Summary description for Class1.
/// </summary>
public class ComDemo : ServicedCompone nt
{
public void AddItem(int iIn, ref String sOut, ref int iOut, ref int
iResult)
{
sOut = "Bob the builder";
iOut = iIn++;
iResult = 6401;
}

}
}

Once compiled, i use the regsvcs util to register it with COM+.

Thanks for your help.

Paul

"Rob Windsor [MVP]" <rw******@NO.MO RE.SPAM.bigfoot .com> wrote in message
news:ey******** ******@TK2MSFTN GP12.phx.gbl...
Perhaps you could give an example of a component you've created and the
exact problems you've been had attempting to access it through DCOM.

--
Rob Windsor [MVP-VB]
G6 Consulting
Toronto, Canada
"Paul van't Klooster" <pa************ ***@nz.unisys.c om> wrote in message
news:ca******** **@si05.rsvl.un isys.com...
> Hi,
>
> I have a situation where I need to register a COM/COM+ object that I have > written in C# as DCOM.
>
> I have no problems creating COM or COM+ classes using C#, but I have
> not
> been successful in trying to create a class that is accessible through

DCOM.
>
> Is anyone able to help me with this one.
>
> Thanks
> Paul
>
>



Jul 21 '05 #9

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

Similar topics

1
15246
by: Prashanth Uppunda | last post by:
Hello, Does anybody have an idea on how to instantiate a DCOM server residing in another machine using C#? Thanks Prashanth
0
2342
by: David Dolheguy | last post by:
I am in desperate need to get help in answering some questions in regards to building a DCOM Server using C#. I need to create a DCOM server using C#.NET, I realise that you first need to create the managed code, attach interfaces and use the CCW command line tool to add a COM wrapper to the assembly. The server will be communicating with a DCOM client which I didn't write, but I have all the documentation on what interfaces and...
1
1538
by: Bruno van Dooren | last post by:
Hi, currently we have an intern writing an OPC server for us in C++. OPC is a hierarchy of classes based on DCOM. When the intern leaves I will have to maintain that server. since i am new to DCOM, I was wondering if anyone could recommend a good book for learning DCOM: what it is, what it can do, how to program and use it ...
3
2025
by: Alex | last post by:
I'm having a problem porting an ASP solution to ASPX. In the ASP solution I'm accessing a DCOM server, create sub DCOM objects and call functions from VB script on the ASP pages. The DCOM object handles are stored in session variables. This works fine without a problem. Ported it to ASPX, accessing the same DCOM server from code behind pages. Still, usually no problems. However sometimes I'm seeing an error stating that the DCOM handle...
3
1505
by: Oleg Skopincevs | last post by:
Hi folks, I am stuck on a problem of creating an object via DCOM from a webservice component. Code: Dim sl As LogonSrv.SysLogon = CreateObject("LogonSrv.SysLogon", LogonServer) Is there some kind of security involved in accessing DCOM components? If yes, what kind? Is it configurable?
13
5438
by: Kyle Adams | last post by:
I don't know where is the right place to ask this so I will start here. Can someone explain to me what these represent? I think they all have to do with the middleware level, but I really don't understand what a DCOM Server is or a Microsoft Transaction Server, etc. I have no idea.... Kyle
8
290
by: Paul van't Klooster | last post by:
Hi, I have a situation where I need to register a COM/COM+ object that I have written in C# as DCOM. I have no problems creating COM or COM+ classes using C#, but I have not been successful in trying to create a class that is accessible through DCOM. Is anyone able to help me with this one.
2
3225
by: g | last post by:
we are evaluating CRM packages and are looking for information on the differences/simliarities, pros and cons of these architectures used by various CRM Vendors. We have been searching for more information online and have not really found any comparisons. Client Server ..NET ASP
2
3436
by: =?Utf-8?B?Q2hyaXN0aWFuIEhhdmVs?= | last post by:
Hi, in a existing application (DCOM server and client, both in VC++) we have very often problems with the DCOM-configuration. Is the requiered configuration (open ports) in applications using .NET remoting much more easier than in DCOM applications? What is with the performance, if the DCOM server has a .NET remoting object client and the DCOM client (VC++) uses the .NET remoting object as the server?
0
8372
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8285
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8814
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8706
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8591
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6160
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5621
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4293
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1915
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.