Remote COM server in C#?

Is the subj feasible?

More detailed question: I've got a WCF service, which must be accessed
from a remote application written in c++. I thought it would be much
simple, if all the objects in the service would be accessible as COM
objects as well.

Thanks.
0
Igor
5/26/2010 2:55:07 PM
dotnet.languages.csharp 1931 articles. 0 followers. Follow

6 Replies
800 Views

Similar Articles

[PageSpeed] 29

Igor R. wrote:
> Is the subj feasible?
> 
> More detailed question: I've got a WCF service, which must be accessed
> from a remote application written in c++. I thought it would be much
> simple, if all the objects in the service would be accessible as COM
> objects as well.

Yes, you can write a COM server in C#.  You'll need to import the COM 
types (see tlbimp.exe) and register your assembly (see regasm.exe).  See 
".NET COM interop" for more details.

Pete
0
Peter
5/26/2010 3:27:59 PM
I had the same problem:

Wrote a local .NET COM Server that communicates with the WCF Server by the 
common .NET build in features.
C++ apps only communicate with that COM Server by its public interface.

As easy as that.

BR,
Kevin

"Igor R." <igor.rubinov@gmail.com> wrote in message 
news:62f18178-8907-45ea-8952-43057a596fe4@o1g2000vbe.googlegroups.com...
> Is the subj feasible?
>
> More detailed question: I've got a WCF service, which must be accessed
> from a remote application written in c++. I thought it would be much
> simple, if all the objects in the service would be accessible as COM
> objects as well.
>
> Thanks. 

0
Kevin
5/26/2010 3:29:34 PM
Thanks for your replies.
I know how to make an inproc (dll) COM server in C#. The problem is
that when I try to apply regasm to an exe, it says that no types were
registered.
0
Igor
5/26/2010 6:58:27 PM
Why do you need an application? Is a dll c# COM server not sufficient?

That COM Server is nothing more than a COM wrapper for the WCF server.

Kevin

"Igor R." <igor.rubinov@gmail.com> wrote in message 
news:7a6b96d5-e38b-42af-aeda-627c63b7f952@v18g2000vbc.googlegroups.com...
> Thanks for your replies.
> I know how to make an inproc (dll) COM server in C#. The problem is
> that when I try to apply regasm to an exe, it says that no types were
> registered. 

0
Kevin
5/26/2010 9:14:04 PM
> Why do you need an application? Is a dll c# COM server not sufficient?
>
> That COM Server is nothing more than a COM wrapper for the WCF server.

You mean that I have make another DLL that would expose all the
interfaces of the WCF server, and implement them by forwadring to the
WCF server? Well, for lack of any other option, that's what I'm doing
now, but it doubles the maintenance cost.
0
Igor
5/27/2010 11:42:46 AM
Igor R. wrote:
>> Why do you need an application? Is a dll c# COM server not sufficient?
>>
>> That COM Server is nothing more than a COM wrapper for the WCF server.
> 
> You mean that I have make another DLL that would expose all the
> interfaces of the WCF server, and implement them by forwadring to the
> WCF server? Well, for lack of any other option, that's what I'm doing
> now, but it doubles the maintenance cost.

I don't really think that's necessary.  You should look more closely at 
why regasm.exe isn't finding anything to export.  Maybe you've just 
forgotten to enable COM visibility in the project settings, or something 
else simple like that?

Pete
0
Peter
5/27/2010 3:14:38 PM
Reply:

Similar Artilces:

Frequent ExchSrvr restarts needed for remote users
Hello all – I have a mob of disenchanted users about to lynch me because of a problem that I cannot get to the bottom of. I recently migrated Exchange 5.5 to 2K3, consolidating three sites in the process. Now we have one Exchange Server at headquarters that hosts all mailboxes and public folders. The problem is with the users at the remote sites. Approximately every three business days, I have to restart the Exch Srvr, because over the space of a few hours, many users at the remotes sites are unable to connect to it. (“Trying to connect..” in the Outlook status bar). Only a resta...

Compacting remotely?
Hello All I have an access97 backend mdb, which I would like to compact/repair automatically overnight. Is it possible to leave a separate mdb open that would open the backend mdb, compact it, then close it again? I'm sure this can be done because I think I've read something about it somewhere: but I can't remember how - or where! Hope someone can help. Thanks Leslie Isaacs well you could schedule it with windows. take a look at Albert Kallal's solution here: http://www.members.shaw.ca/AlbertKallal/BatchJobs/Index.html change the code to compact the database... -- M...

Multiple Virtual Server Problems
Hi! I have problem with multiple POP3/IMAP4 virtual servers on Exchange 2003. I have Default Virtual Server POP3/IMAP4 and wanted to create the second secure server with the same IP address. The created second virtual server (POP3 or IMAP4) cannot be startet. There is an eventview warning: Event ID: 1036 Source: POP3Svc Category: General Error-Massage: “An error occurred while starting the Microsoft Exchange POP3 Service: server instance number 2 failed to start with error 0x800cc801.” All my port and IP configurations for virtual servers are correct. I have the following configurations ...

Como activar o suplemento "Acrobat PDFMaker Office COM Addin"?
Instalei o Adobe Acrobat 8.0 pro e não consigo activar o "Acrobat PDFMaker Office COM Addin" que permite converter documentos para pdf (tem funcionalidades que o guardar como pdf não permite), como fazê-lo? ...

Xpath equivalent to select in for sql server??
What I am trying to do is filter on some attributes and I could have a list of values, so instead of doing where attribute = value or attribute = value, I am wondering if there is something equivalent to the IN statement in sql, so attribute in (value1, value2) etc.. Thanks Shay1975 wrote: > What I am trying to do is filter on some attributes and I could have a > list of values, so instead of doing where attribute = value or > attribute = value, I am wondering if there is something equivalent to > the IN statement in sql, so attribute in (value1, value2) etc.. XPath 2.0 allo...

Process Server #3
I can't seem to find much documentation on this other than the Online Help. Has anybody used this before? We are running a custom application that can be fairly processer intensive and would like to setup process servers. But from what I can tell of the tool, it only seems to pick up Standard GP functions. Is there any way to get the Process Server to run custom code? Thanks, Dennis. ...

Remote Active Sync
Hello, I just upgraded to Exchange 2003 Server and I have no idea how to setup Mobile Access. I would like to sync my pocket pc remotely. Does anyone know where I can get step by step instructions on how to do this? Thanks, Jose ...

Windows server 2008 R2 DEFRAG analysis every afternoon? Automatic...
I am seeing event log event 258 every afternoon at 2pm Defrag analysis on every drive on this W2K8 R2 box. The event is: "event 258" "The disk defragmenter successfully completed analysis on drivename (X:)" This is not the Defrag scheduled task, which I have running on the weekend... This is a File Server and the time that this runs does not seem good to me since there are many users with open files at this time. I cannot find where to disable or reschedule this event. Does Anyone knbow about this? Thanks in advance! REP ...

Intelligent Message Filtering in MS Exchange Server 2003
Is it possible to add a domain that won't be filtered in the IMF (global settings -> message delivery) under systems manager. It would seem something like this would be easy. Currently, I run into the problem of the server side rule (applied first) conflicting with the client side rule (ie. good emails get moved to the junk mail folder). Any ideas? Thanks in advance. <gar598@gmail.com> wrote in message news:1172763869.749821.70960@s48g2000cws.googlegroups.com... > Is it possible to add a domain that won't be filtered in the IMF > (global settings -> message delivery...

temp fix <5befef57-ce53-442c-8191-8786f3b4a049@2g2000hsn.googlegroups.com>
We found that if the Mac users zip the jpgs before sending, the recipients can open and view them fine. Is there stil not a fix for this? ...

moving users to new cluster server
I would like to start migrating all my users about 400 mailboxes from one server with 1 storage group and 5 databases to a cluster server with 2 storage groups and 3 databases each. Should I go with the move mailbox method? What is the best way to do this? On Thu, 8 Mar 2007 09:28:13 -0800, "mcp" <none@none.com> wrote: >I would like to start migrating all my users about 400 mailboxes from one >server with 1 storage group and 5 databases to a cluster server with 2 >storage groups and 3 databases each. Should I go with the move mailbox >method? What is the ...

Remoting
Can I launch with some api an application in a remote pc that is connected to the same lan? If the answer is positive, can I supply also parameters? Regards Mark Overall, the simple answer is "no". In fact, if you can do this, there is a security hole in your network large enough to drive a freight train through. Sideways. However, you can create secure techniques that can allow this; creating the security is a topic well beyond the scope we can discuss here, but what you have to do is create some kind of server process that launches the program with appropriate security cred...

Display Map of Address not redirecting to Expedia.com
I have two systems here that are both using Office 2000, one on SP3 and the other SP4. I have two XP systems, using Office XP that this Display Map of Address function does work for. Anyone have any suggestions? thanks! www.poremsky.com/displaymap.htm -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours http://www.poremsky.com - http://www.cdolive.com Outlook Tips: http://www.outlook-tips.net/ Expert Zone http://www.microsoft.com/windowsxp/expertzone Search for answers: http://groups.google.com Most recent posts to the Outlook newsgroups: http://groups...

Unable to Login to Exchange Server
I recently applied several Windows XP Update, patches and SR's along with one or two Office XP Sr's and updates. Everything worked fine except now I am not able to login to the Mail Exchange Server using Outlook 2002. So far, I've uninstalled and reinstalled Office XP. I've deleted the TCP/IP connection and reinstalled it. I've deleted all cookies but I am still unable to login to the server. The symptoms are; Outlook opens up, a user name and password dialog displays, I enter the information and immediately it reports that my user name or password is invalid. It...

removing old mail server
We had a mail server die some time ago. I have gone through the KB article to make sure everything was moved to other servers. I also ran the uninstall for Exchange on that box but it still shows up in System Manager. What else do I need to do to remove that server? If everything works and the box doesn't exist any more you can delete the msExchExchangeServer object using ADSIEdit. -- Bharat Suneja MCSE, MCT www.zenprise.com blog: www.suneja.com/blog ----------------------------------------- "Brandon" <whocares@you.com> wrote in message news:uTxYA76QGHA.252@TK2M...

3 exchange servers with 1 primary entry point.
we are changing our internet connection in all of our offices. we are setting up an MPLS nextwork. We have 3 exchange servers in 3 offices two of them are at the 2 entry points 1 of them is not. Since they will be going through another entry point they will have the same address as the one at that entry point. So my question is can we have 1 mail server as the primary entry point for the other 2? how do we set this up? Set MX record for your domain to point to IP of the server that is supposed to accept mail for your domain. Configure firewall accordingly. Greg Siegel wrote: > we ...

Vista and CRM Server
I have tried to install the CRM Server on Vista Ultimate. I get to the point where it asks me to enter the Organizational Unit. I select the Browse button and get the error message "Unable to Browse for Active Directory objects". How can I get past this. CRM Server is not supported on this platform. ============================== John O'Donnell Microsoft CRM MVP http://www.crowecrm.com "John Sandor" <JohnSandor@discussions.microsoft.com> wrote in message news:138F3560-5228-4652-8DD9-8E0A06A7EF00@microsoft.com... >I have tried to install the CRM Serv...

how to sink events for com components that don't have visual gui?
I have an dll com component, it doesn't have any gui, you don't used the "insert activex control" from the resource editor to add it to project You go into class wizard->add class->from a type library --- and add component to project that way..... The component has events, but nothing shows up in classview message maps, because there's no message mapping for it.... how do I sink the events for this non-gui component? I do this by hand and dont use the wizard for this. I dont know if there is an easy way to do this thru the wizard. -- Ajay Kalra [MVP - VC...

Remote Office VPN Internet Access
Hi Have Remote Office (RO) PCs connected to Main Office (MO) (SBS 2003) via h/w router Site to Site VPN, on ADSL. Is it possible to route Internet traffic via the local router rather than using the SBS 2003 box for DNS. Objective is to reduce data traffic on the VPN. I am going to add 2nd ADSL line to split off and soley route the VoIP traffic usinng a static route. Or alternatively use a router with VPN trunking with QoS. However, if Internet traffic was kept 'local', the VPN would have more bandwidth for VoIP/files. -- Many Thanks Drew In article <6...

SQL Server Back End
I have an Access 2000 Database with 16 Tables 55 Queries 25 Forms and 60 Reports. The Database has been used to handle from 10,000 up to 50,000 records. This is a Constituents Database that is used by elected members of the legislature to keep track of their Constituents. To date the database has been used as a stand-alone desktop or laptop solution. The database has been networked on up to 3 machines in some offices with Microsoft Home Network. There is a growing demand for a system that can be accessed from computers in different locations. I downloaded SQL Server Express 2005 from M...

How to call aspx page from C#
Hello, I am forming a aspx url with query string parameters as variables. sUrl = "http://abcd.com/getresults.aspx?zipcode=" + zipcode + "&areaCode=" + areacode + "&Landmark=" + landmark; When this url formed is run in IE, it returns an xml in the browser. Now I want to duplicate this functionality in my code (like invoking this url from within a function and getting the xml as output from the function) so that my code can parse the xml got in return. Kindly suggest a way in which this can be achieved? Thanks in advance, Sudeep sudeeprgaitonde@gm...

Putting Database on Server so other Employees can access it
I just put a database I created on our server. The other 2 people who will be using it arent able to open it up though. Can someone please point me in the right direction of how to fix this so they can use it? Thanks for your help!!! 1. All users of the database must have at least read, write, create, delete (or modify) privileges to the folder holding the database file. Not just the database .mdb file, but the entire folder. 2. Open the database and go to Tools, Options, and Advanced Tab. Set the Default Open mode to Shared and the Default Record Locking to Edited Record. (...

remote connections
In SS2K , how to enable remote connections ? For example, from my machine, within SEM I'd like to create a "New SQL Server Registration" connection to that machine. This has always worked for me in the past, but today I've encountered an SS2K instance which gives me a "SQL Server does not exist or access denied. ConnectionOpen (Connect())" error. Does it matter if the target instance is configured as "Windows Authentication" vs "Mixed Mode" ? I'm attempting the "New SQL Server Registration" via Windows Authentication. I...

How to handle event of ATL COM Dll in MFC Client like in VB6 ?
Hello everybody, I'm a newbie with MFC and ATL (VS6.0), I'm learning how to make COM Dll with ATL and using it in MFC project . Now I can make a simple ATL COM Dll project that has some functions and some events , I can catch these events with VB6 using Withevents keyword and It works fine . I would like now to make and MFC project (VS6.0) and use my ATL component inside this project, I use the #import directive and can call almost functions of this COM dll, but I want to handle its events as well as with VB6 . Could you please provide me some information how to do it ? I need simple...

Disable SQL Server version check?
I am looking for settings that I could use to create new companies on a test box that I am running Yukon (SQL Server 2005). The problem is that the utilities check the version of SQL installed before continuing. I have done a lot of testing with upgraded databases and they work fine but every time I try to create a new company I get: The stored procedure verifyServerVersion() of form duSQLInstall : 111 : Pass Through SQL returned the following results : DBMS: 0, Great Plains: 0 GP 8 (or prior) do not support SQL 2005. Service pack 4 for GP 8 will support SQL 2005. "Thomas R....