473,406 Members | 2,377 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

.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 2276
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.com> wrote in message
news:ca**********@si05.rsvl.unisys.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********@century.fox> wrote in message
news:15****************@news.west.earthlink.net...
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.com> wrote in message
news:ca**********@si05.rsvl.unisys.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.MORE.SPAM.bigfoot.com> wrote in message
news:OZ*************@TK2MSFTNGP11.phx.gbl...

"Benjamin Disraeli" <ni********@century.fox> wrote in message
news:15****************@news.west.earthlink.net...
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.EnterpriseServices;

[assembly: AssemblyTitle("ComDemo")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile("..\\..\\comkey.snk")]
[assembly: AssemblyKeyName("")]
[assembly: ApplicationName("ComDemo")]
[assembly: Description("A coms demo")]
[assembly: ApplicationActivation(ActivationOption.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 : ServicedComponent
{
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.MORE.SPAM.bigfoot.com> wrote in message
news:ey**************@TK2MSFTNGP12.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.com> wrote in message
news:ca**********@si05.rsvl.unisys.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|Build 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.com> wrote in message
news:ca***********@si05.rsvl.unisys.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.EnterpriseServices;

[assembly: AssemblyTitle("ComDemo")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile("..\\..\\comkey.snk")]
[assembly: AssemblyKeyName("")]
[assembly: ApplicationName("ComDemo")]
[assembly: Description("A coms demo")]
[assembly: ApplicationActivation(ActivationOption.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 : ServicedComponent
{
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.MORE.SPAM.bigfoot.com> wrote in message
news:ey**************@TK2MSFTNGP12.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.com> wrote in message
news:ca**********@si05.rsvl.unisys.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("..\\..\\KeyFile.snk")]
[assembly: ApplicationName("DCOMDemo")]
[assembly: ApplicationID("12345678-0123-4321-1234-0123456789AB")]
[assembly: ApplicationAccessControl(true)]
[assembly: ApplicationActivation(ActivationOption.Server)]

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

[GuidAttribute("76543210-0123-4321-1234-0123456789AB")]
[ClassInterface(ClassInterfaceType.None)]
public class DCOMDemo: ServicedComponent, IDCOMDemo
{
string IDCOMDemo.SayHello(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.com> wrote in message
news:ca***********@si05.rsvl.unisys.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.EnterpriseServices;

[assembly: AssemblyTitle("ComDemo")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile("..\\..\\comkey.snk")]
[assembly: AssemblyKeyName("")]
[assembly: ApplicationName("ComDemo")]
[assembly: Description("A coms demo")]
[assembly: ApplicationActivation(ActivationOption.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 : ServicedComponent
{
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.MORE.SPAM.bigfoot.com> wrote in message
news:ey**************@TK2MSFTNGP12.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.com> wrote in message
news:ca**********@si05.rsvl.unisys.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
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
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...
1
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...
3
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...
3
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...
13
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...
8
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...
2
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...
2
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.