473,804 Members | 3,153 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Remoting Class From Seperate DLL

I have a class in a seperate dll which I want to remote. I have referenced
the class and registered it using a simple exe. I can connect to the class's
interface using Activator.GetOb ject and call it's methods. However, when I
use soapsuds to extract meta data, I get the following error:

Error: Unable to retrieve schema from url:
http://localhost:1234/RemoteObject.soap?WSDL, The remote server returned an
error: (500) Internal Server Error.

Browser response is below. What am I doing wrong? Thanks.

System.NullRefe renceException: Object reference not set to an instance of an
object. at
System.Runtime. Remoting.Metada taServices.Real SchemaType.Reso lve(StringBuild e
r sb) at System.Runtime. Remoting.Metada taServices.XMLN amespace.Resolv e() at
System.Runtime. Remoting.Metada taServices.Wsdl Generator.Resol ve() at
System.Runtime. Remoting.Metada taServices.Wsdl Generator.Gener ate() at
System.Runtime. Remoting.Metada taServices.SUDS Generator.Gener ate() at
System.Runtime. Remoting.Metada taServices.Meta Data.ConvertTyp esToSchemaToStr e
am(ServiceType[] serviceTypes, SdlType sdlType, Stream outputStream) at
System.Runtime. Remoting.Metada taServices.SdlC hannelSink.Gene rateSdl(SdlType
sdlType, IServerResponse ChannelSinkStac k sinkStack, ITransportHeade rs
requestHeaders, ITransportHeade rs responseHeaders , Stream& outputStream) at
System.Runtime. Remoting.Metada taServices.SdlC hannelSink.Proc essMessage(ISer v
erChannelSinkSt ack sinkStack, IMessage requestMsg, ITransportHeade rs
requestHeaders, Stream requestStream, IMessage& responseMsg,
ITransportHeade rs& responseHeaders , Stream& responseStream) at
System.Runtime. Remoting.Channe ls.Http.HttpSer verTransportSin k.ServiceReques t
(Object state) at
System.Runtime. Remoting.Channe ls.SocketHandle r.ProcessReques tNow()
Nov 16 '05 #1
8 2700
Hi, using soapsuds is not good idea. There are a lot of problems with
this. I'd recomend you to use abstract class or interface approach.

Sunny
In article <eW************ *@TK2MSFTNGP11. phx.gbl>, ri******@rogge. co.uk
says...
I have a class in a seperate dll which I want to remote. I have referenced
the class and registered it using a simple exe. I can connect to the class's
interface using Activator.GetOb ject and call it's methods. However, when I
use soapsuds to extract meta data, I get the following error:

Error: Unable to retrieve schema from url:
http://localhost:1234/RemoteObject.soap?WSDL, The remote server returned an
error: (500) Internal Server Error.

Browser response is below. What am I doing wrong? Thanks.

System.NullRefe renceException: Object reference not set to an instance of an
object. at
System.Runtime. Remoting.Metada taServices.Real SchemaType.Reso lve(StringBuild e
r sb) at System.Runtime. Remoting.Metada taServices.XMLN amespace.Resolv e() at
System.Runtime. Remoting.Metada taServices.Wsdl Generator.Resol ve() at
System.Runtime. Remoting.Metada taServices.Wsdl Generator.Gener ate() at
System.Runtime. Remoting.Metada taServices.SUDS Generator.Gener ate() at
System.Runtime. Remoting.Metada taServices.Meta Data.ConvertTyp esToSchemaToStr e
am(ServiceType[] serviceTypes, SdlType sdlType, Stream outputStream) at
System.Runtime. Remoting.Metada taServices.SdlC hannelSink.Gene rateSdl(SdlType
sdlType, IServerResponse ChannelSinkStac k sinkStack, ITransportHeade rs
requestHeaders, ITransportHeade rs responseHeaders , Stream& outputStream) at
System.Runtime. Remoting.Metada taServices.SdlC hannelSink.Proc essMessage(ISer v
erChannelSinkSt ack sinkStack, IMessage requestMsg, ITransportHeade rs
requestHeaders, Stream requestStream, IMessage& responseMsg,
ITransportHeade rs& responseHeaders , Stream& responseStream) at
System.Runtime. Remoting.Channe ls.Http.HttpSer verTransportSin k.ServiceReques t
(Object state) at
System.Runtime. Remoting.Channe ls.SocketHandle r.ProcessReques tNow()

Nov 16 '05 #2
I would recommend switching to an abstract class or interface based
approach. See examples in my article here

http://www.glacialcomponents.com/Art...D=RemoteObject
Allen Anderson
http://www.glacialcomponents.com
mailto: allen@put my website url here.com
On Tue, 18 May 2004 08:44:27 +0100, "Richard Bell"
<ri******@rogge .co.uk> wrote:
I have a class in a seperate dll which I want to remote. I have referenced
the class and registered it using a simple exe. I can connect to the class's
interface using Activator.GetOb ject and call it's methods. However, when I
use soapsuds to extract meta data, I get the following error:

Error: Unable to retrieve schema from url:
http://localhost:1234/RemoteObject.soap?WSDL, The remote server returned an
error: (500) Internal Server Error.

Browser response is below. What am I doing wrong? Thanks.

System.NullRef erenceException : Object reference not set to an instance of an
object. at
System.Runtime .Remoting.Metad ataServices.Rea lSchemaType.Res olve(StringBuil de
r sb) at System.Runtime. Remoting.Metada taServices.XMLN amespace.Resolv e() at
System.Runtime .Remoting.Metad ataServices.Wsd lGenerator.Reso lve() at
System.Runtime .Remoting.Metad ataServices.Wsd lGenerator.Gene rate() at
System.Runtime .Remoting.Metad ataServices.SUD SGenerator.Gene rate() at
System.Runtime .Remoting.Metad ataServices.Met aData.ConvertTy pesToSchemaToSt re
am(ServiceTy pe[] serviceTypes, SdlType sdlType, Stream outputStream) at
System.Runtime .Remoting.Metad ataServices.Sdl ChannelSink.Gen erateSdl(SdlTyp e
sdlType, IServerResponse ChannelSinkStac k sinkStack, ITransportHeade rs
requestHeaders , ITransportHeade rs responseHeaders , Stream& outputStream) at
System.Runtime .Remoting.Metad ataServices.Sdl ChannelSink.Pro cessMessage(ISe rv
erChannelSinkS tack sinkStack, IMessage requestMsg, ITransportHeade rs
requestHeaders , Stream requestStream, IMessage& responseMsg,
ITransportHead ers& responseHeaders , Stream& responseStream) at
System.Runtime .Remoting.Chann els.Http.HttpSe rverTransportSi nk.ServiceReque st
(Object state) at
System.Runtime .Remoting.Chann els.SocketHandl er.ProcessReque stNow()


Nov 16 '05 #3
Thanks for your comments, but I want to use the 'new' operator and configure
remoting using the standard framework. The reason it was failing is that my
object exposed an interface which was contained in a separate dll. I have
moved the interface to the server dll and it all works fine. However, I have
2 questions for the group
1) I understood from the Soapsuds docs that classes for the assembly and
referenced assemblies would be imported. This does not appear to be the
case. Can this be forced?
2) Attributes assigned to the objects are not exported in the output
assembly/code. Is it possible to enforce this?
Thanks.
Nov 16 '05 #4
Hi Richard,

as a general, I do not recomend to use soapsuds. It's the less scalable
method. Try using abstract classes or interfaces in a separate assembly.

Sunny

In article <#1************ **@TK2MSFTNGP10 .phx.gbl>, ri******@rogge. co.uk
says...
Thanks for your comments, but I want to use the 'new' operator and configure
remoting using the standard framework. The reason it was failing is that my
object exposed an interface which was contained in a separate dll. I have
moved the interface to the server dll and it all works fine. However, I have
2 questions for the group
1) I understood from the Soapsuds docs that classes for the assembly and
referenced assemblies would be imported. This does not appear to be the
case. Can this be forced?
2) Attributes assigned to the objects are not exported in the output
assembly/code. Is it possible to enforce this?
Thanks.

Nov 16 '05 #5
Why is it less scaleable?
Nov 16 '05 #6
Lets say, that you find some problem in the server object. You have to
correct this. And now you have a new class. All remoting clients will
fail to use it, unless you recompile them with the new meta data,
extracted from the new class. Even replacing only 50 clients can be a
lot of pain.

And if to search in the newsgroups, you will find a lot of problems
experienced by people, using soapsuds.

Using interfaces, if you do not change the interface assembly, clients
does not have to be touched, they will work with every class which
implements the well known interface.

Or, let's say, you are ready for version 2. You create a new interface,
which extends the previous one. And your server object implements it as
well. Now, the old clients will continue to work using the old
interface, and the new clients, with richer functionality, will use the
new one.

I think that only these 2 reasons are enough.

Sunny

In article <#8************ **@TK2MSFTNGP12 .phx.gbl>, ri******@rogge. co.uk
says...
Why is it less scaleable?

Nov 16 '05 #7
OK, thanks, but I do not think that your comments relate to saleability but
to deployment. Even so, I am not sure that I entirely agree with you.

1. You can control how versioning is implemented in the serialization of
calls using the 'includeVersion s' and 'strictBinding' attributes of the
formatter element. As long as you do not change the signature of the method
and configure versioning correctly, server rebuilds need not break the
client. The server side execution of Invoke should continue to work. You
only have issues with strongly named assemblies where versioning appears to
be enforced for the binary formatter, but you can get round this, if you
want to (but should you?).
2. Using the 'new' operator does not preclude you from using
interfaces/abstract classes on the client. The issue relates to how the
reference to the remote proxy is obtained. In the 'interface only case', the
location of the 'CoClass' is either hardcoded into the app or obtained by
some custom method. In the case of soapsuds, it is obtained by the framework
method.
3. You are not precluded from implementing a v2 interface type framework
using soapsuds. However, using the 'interface only method' can cause
problems in deployment. You cannot force 'old' clients to use the 'old'
assembly since the 'new' assembly will be listening on the same socket the
'old' client is talking to, and, you might want to (ie back to DLL hell).
The Soapsuds framework does allow you to control versioning precisely. In
fact I believe that it was designed with that intent in mind.

So there are pros and cons. However, it seems to me that soapsuds satisfies
the "location transparency" goal of a remoting framework in that neither the
server nor client objects need to know whether they are being remoted or in
fact whether they are being called by a remote object at all.
Nov 16 '05 #8
Its more of a deployment issue as opposed to a scalability issue isnt it ;)

Sunny wrote:
Lets say, that you find some problem in the server object. You have to
correct this. And now you have a new class. All remoting clients will
fail to use it, unless you recompile them with the new meta data,
extracted from the new class. Even replacing only 50 clients can be a
lot of pain.

And if to search in the newsgroups, you will find a lot of problems
experienced by people, using soapsuds.

Using interfaces, if you do not change the interface assembly, clients
does not have to be touched, they will work with every class which
implements the well known interface.

Or, let's say, you are ready for version 2. You create a new interface,
which extends the previous one. And your server object implements it as
well. Now, the old clients will continue to work using the old
interface, and the new clients, with richer functionality, will use the
new one.

I think that only these 2 reasons are enough.

Sunny

In article <#8************ **@TK2MSFTNGP12 .phx.gbl>, ri******@rogge. co.uk
says...
Why is it less scaleable?


--
Regards,
Dilip Krishnan
MCAD, MCSD.net
dilipdotnet at apdiya dot com
Nov 16 '05 #9

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

Similar topics

3
254
by: Patty O'Dors | last post by:
Hi I posted a similar question like this to a reply to another thread but it wasn't really relevant to that thread and I don't think anybody read it so I'm posting a new one. I'm trying to think of a use for remoting in the workplace, but can't. I want to look cool by "running commands over the network" and using "virtual server application protocols" that would make me look the don in front of bosses and probably gain me a pay rise,...
4
3119
by: Uchiha Jax | last post by:
Hello everyone, I am a plenty silly person who is trying to learn .NET remoting through trial and error (all articles I read are going over my head at the moment (mostly) so I thought i'd give it a go). What I want to do is this: Have a server instance of the program, this server instance will receive communication from client programs (as demonstrated in the AddMessage()
0
1060
by: David Stevenson | last post by:
If anyone else is having the error Unhandled Exception: System.InvalidCastException: Return argument has an invalid type. when calling a method on a remote object that returns a complex data type (IE not int or string), I have figured out a workaround. When you want to share an object between two programs in general, I recommend putting all the classes that you might need to share between the two programs in a completely seperate DLL...
2
2494
by: Sharon | last post by:
I have a Form class that can be open by parent Form or by .NET Remoting command. When the parent Form opens the Form - All fine ! But when the .NET Remoting command is trying to Show the Form, the Form stuck !! I tried to change the Remoting delegate invocation to asynchronous and to synchronous, yet both cause the same Form Show() to stuck. When I mean stuck, I mean the the Form is shown but non of it controls are shown, only gray window...
2
2843
by: matthew_glen_evans | last post by:
Hi there, Quick one about interfaces in c#. It seems that it is illegal to declare types within an interface. I was quite used to doing this in VB.net where the interface can define a clients remoting interface and object model. eg..
0
243
by: anilkoli | last post by:
A. Whether following by using remoting One application is running, and one object is instantiated of a any class from that. Is it possible to get access to that object through another application? B. In simple language I want when to use remoting. Whether it is a alternative solution for 1. using socket 2. communication between two objects of different classes of
8
4154
by: nyhetsgrupper | last post by:
I have written a windows service and want to expose a web based user interface for this service. I then wrote a class library containing a ..net remoting server. The class library have a method named StartRemotingServer(). To be able to call this method from the windows service I need to reference the remoting class library, but for the class library to be able to access the internal structures of the windows service the class library...
1
1851
by: Derrick | last post by:
Hello all; I'm having a bit of trouble with .NET remoting. Here's my scenario: I have a "remotable" type which is served by a Windows Service. I have a WinForms app which consumes the remotable type. I'm using the Observer pattern, so the client registers with the server, and the server refreshes the client as appropriate (doing it this way because the server polls a device over the serial port, and will update any registered...
2
3058
by: erbilkonuk | last post by:
Hi, I am very new to .NET Remoting and I try to run a simple program to subscribe to an event raised by Remoting Class. The Remoting Server initiates an instance of Remoting Class as Singleton / Server activated mode on startup. The Remoting Client accesses the Remoting Class through the interface of the Class and subscribes to an event of the Remoting Class that will be fired upon the private member value change.
0
9708
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
9587
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
10340
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
6857
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
5527
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5662
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4302
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3827
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2998
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.