473,395 Members | 1,986 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,395 software developers and data experts.

.NET Remoting and COM Interop Component

I'm running into another problem with my component.

I'm trying to use .NET remoting to avoid complex firewall issues.

I have a webserver which is the client machine and a database server which
is the server machine. On the database server I have created a Windows
Service which binds a component to port 42525 using TCP. The component
involved contains a reference to a VB6 DLL in which are some functions used
by the component.

On the webserver client I have a simple console application to test the
complete solution. I'm able to communicate with the remote object, though
when the remote object tries to create an instance of the VB6 DLL the client
application receives the error 'ClassFactory cannot supply requested class'.

I've tried to invoke the VB6 DLL from a simple console app on the server.
This results in invoking the VB6 DLL correctly. Problem seems to have
something to do with remoting.

Can anyone give me a clue?

--
Michel Smit
Atos Origin Nederland BV
Sep 1 '06 #1
3 2203
Remember that for Remoting to work on a component, that component needs
to be serializable. Most VB6 DLL's will not be serializable unless some
very complex programming was thought of during the creation of the DLL.
The only "normal" means of communicating with a VB6 DLL via remoting is
a wrapper class that exposes an interface for the remoting side and
provides the functionality on the server side.

HTH

David

"Michel Smit" <mp****@community.nospamwrote in message
news:38**********************************@microsof t.com:
I'm running into another problem with my component.

I'm trying to use .NET remoting to avoid complex firewall issues.

I have a webserver which is the client machine and a database server which
is the server machine. On the database server I have created a Windows
Service which binds a component to port 42525 using TCP. The component
involved contains a reference to a VB6 DLL in which are some functions used
by the component.

On the webserver client I have a simple console application to test the
complete solution. I'm able to communicate with the remote object, though
when the remote object tries to create an instance of the VB6 DLL the client
application receives the error 'ClassFactory cannot supply requested class'.

I've tried to invoke the VB6 DLL from a simple console app on the server.
This results in invoking the VB6 DLL correctly. Problem seems to have
something to do with remoting.

Can anyone give me a clue?

--
Michel Smit
Atos Origin Nederland BV

Sep 1 '06 #2
Thank you David.

At the moment I have a .NET component which I expose for use by remoting.
This .NET class which will be used remotely invokes an instance of a certain
COM component. When trying to invoke other COM components like MSXML2 things
are working correctly on the client side, but this particular COM component
causes the 'ClassFactory' error.
--
Michel Smit
Atos Origin Nederland BV
"David Williams" wrote:
Remember that for Remoting to work on a component, that component needs
to be serializable. Most VB6 DLL's will not be serializable unless some
very complex programming was thought of during the creation of the DLL.
The only "normal" means of communicating with a VB6 DLL via remoting is
a wrapper class that exposes an interface for the remoting side and
provides the functionality on the server side.

HTH

David

"Michel Smit" <mp****@community.nospamwrote in message
news:38**********************************@microsof t.com:
I'm running into another problem with my component.

I'm trying to use .NET remoting to avoid complex firewall issues.

I have a webserver which is the client machine and a database server which
is the server machine. On the database server I have created a Windows
Service which binds a component to port 42525 using TCP. The component
involved contains a reference to a VB6 DLL in which are some functions used
by the component.

On the webserver client I have a simple console application to test the
complete solution. I'm able to communicate with the remote object, though
when the remote object tries to create an instance of the VB6 DLL the client
application receives the error 'ClassFactory cannot supply requested class'.

I've tried to invoke the VB6 DLL from a simple console app on the server.
This results in invoking the VB6 DLL correctly. Problem seems to have
something to do with remoting.

Can anyone give me a clue?

--
Michel Smit
Atos Origin Nederland BV

Sep 1 '06 #3
Hi Michel,

Glad to see you again.

As for this issue, I think it is likely an ActiveX component (.net interop)
issue in windows service environment rather than .net remoting specific.
Have you received my mail which has mentioned some general suggestion on
this?

Based on my research, there are some existing web threads discussign on
similar problem and most of them are caused by some script library
components. The reason why I suspect the problem specific to windows
service is because the error here "ClassFactory cannot supply requested
class" indicate that there is some problem get the component's interface
and this is possiblye specific to the windows service application
environment since it running in a deamon session with a service account
normally. Also, as you said that youv'e created a .ne wrapper
class(MarshalByRef ?) around the VB 6 component to serve the remoting
client, I don't think there should be any serialization problem(as long as
the return type from wrapper class is ok).

BTW, since this could be component specific, would you provide some
information about this VB6 dll's internal code logic and what is it doing
internally? Meanwhile, I will perform some test acorrding to your
description on my side to see whether this is a common reproducable issue.

Please feel free to let me know if there is anything else you wonder or if
there is any new update.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Sep 4 '06 #4

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

Similar topics

0
by: Karuppasamy | last post by:
H I have created a Windows Application using C#. This Windows application makes a call to a Remoting Object which runs as a Windows Service. This Remoting Component makes a call to a Com+(Name :...
0
by: Trokey | last post by:
Here's my setup: Component A: .NET exe acting as a .NET remoting server. The channel type is tcp. Component B: .NET assembly acting as a .NET remoting client with event handlers for server...
6
by: Catherine Jones | last post by:
Hi all, we need urgent help in a matter. We are trying to pass a COM object from the client to server and are facing some problems in the same. We've our client in C# as well as the Server...
1
by: Shiro | last post by:
Hi I have read the various postings relating to Interop strong name signing and cannot find an example similar to mine. I have stringly named my AxInterops/Interops and they all work just...
5
by: Wendy Elizabeth | last post by:
I want a Visual Basic 6.0 web or desk top application to communicate with a Visual Basic.NET web or desktop application. I also want a Visual Basic.NET web or windows application to communicate...
5
by: LGHummel | last post by:
I'm trying to host a remoting app in IIS and am getting the following error: Failed to execute the request because the ASP.NET process identity does not have read permissions to the global...
6
by: AMDRIT | last post by:
Hello folks, I appologize for the cross post, but I really need an answer on this: I do not think that I am seeing the whole picture here. I would like to create a windows service and a...
3
by: =?Utf-8?B?U0Q=?= | last post by:
Hi, I'm using the the MSDN sample "COM Interop Part 2 Sample" (CSharpServerWithCOMClient.sln). The C# COM component gets registered when the solution is built. Somehow the component doesn't get...
2
by: =?Utf-8?B?QkY=?= | last post by:
I am currently working on moving our business objects into COM+ serviced components. But in the process, there are too many changes such ComVisible and serviced component does not support...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
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
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...
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.