473,508 Members | 2,329 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

MSDN .Net Remoting Sample ?

Hello,
I am trying to build and run the Remoting Sample from MSDN. Everything
compiles. The Listener appears to run. The Client throws this
RemotingException:

A first chance exception of type
'System.Runtime.Remoting.RemotingException' occurred in mscorlib.dll
RemotingException.Message
Cannot load type 'RemotableType, RemotableType'.
RemotingException.StackTrace

Server stack trace:
at
System.Runtime.Remoting.RemotingConfigHandler.Remo tingConfigInfo.LoadType(String
typeName, String assemblyName)
at
System.Runtime.Remoting.RemotingConfigHandler.Remo tingConfigInfo.GetServerTypeForUri(String
URI)
at
System.Runtime.Remoting.RemotingConfigHandler.GetS erverTypeForUri(String
URI)
at
System.Runtime.Remoting.RemotingServices.GetServer TypeForUri(String
URI)
at
System.Runtime.Remoting.Channels.SoapServerFormatt erSink.ProcessMessage(IServerChannelSinkStack
sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders,
Stream requestStream, IMessage& responseMsg, ITransportHeaders&
responseHeaders, Stream& responseStream)

Exception rethrown at [0]:
at
System.Runtime.Remoting.Proxies.RealProxy.HandleRe turnMessage(IMessage
reqMsg, IMessage retMsg)
at
System.Runtime.Remoting.Proxies.RealProxy.PrivateI nvoke(MessageData&
msgData, Int32 type)
at RemotableType.RemotableType.StringMethod()
at Client.Client.Form1_Load(Object sender, EventArgs e) in
C:\Documents and Settings\Owner\My Documents\Visual Studio
2005\Projects\RhsRemotingTest\Client\Client\Client .vb:line 13

Any ideas?
Bill

Feb 20 '06 #1
9 8044
My suggestion is not to use remoting.

I have done some work with it ... I would look into Indigo, Windows
Communication Foundation instead.
<sw************@yahoo.com> wrote in message
news:11*********************@g44g2000cwa.googlegro ups.com...
Hello,
I am trying to build and run the Remoting Sample from MSDN. Everything
compiles. The Listener appears to run. The Client throws this
RemotingException:

A first chance exception of type
'System.Runtime.Remoting.RemotingException' occurred in mscorlib.dll
RemotingException.Message
Cannot load type 'RemotableType, RemotableType'.
RemotingException.StackTrace

Server stack trace:
at
System.Runtime.Remoting.RemotingConfigHandler.Remo tingConfigInfo.LoadType(String
typeName, String assemblyName)
at
System.Runtime.Remoting.RemotingConfigHandler.Remo tingConfigInfo.GetServerTypeForUri(String
URI)
at
System.Runtime.Remoting.RemotingConfigHandler.GetS erverTypeForUri(String
URI)
at
System.Runtime.Remoting.RemotingServices.GetServer TypeForUri(String
URI)
at
System.Runtime.Remoting.Channels.SoapServerFormatt erSink.ProcessMessage(IServerChannelSinkStack
sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders,
Stream requestStream, IMessage& responseMsg, ITransportHeaders&
responseHeaders, Stream& responseStream)

Exception rethrown at [0]:
at
System.Runtime.Remoting.Proxies.RealProxy.HandleRe turnMessage(IMessage
reqMsg, IMessage retMsg)
at
System.Runtime.Remoting.Proxies.RealProxy.PrivateI nvoke(MessageData&
msgData, Int32 type)
at RemotableType.RemotableType.StringMethod()
at Client.Client.Form1_Load(Object sender, EventArgs e) in
C:\Documents and Settings\Owner\My Documents\Visual Studio
2005\Projects\RhsRemotingTest\Client\Client\Client .vb:line 13

Any ideas?
Bill

Feb 20 '06 #2
You may have a point. With my current problem,
'Activator.CreateInstance' returns its System.Object without throwing
an exception. 'CType' casts the System.Object to the particular type
without throwing an exception either. When I try to use the instance of
the particular type, everything hangs. Has anyone seen this before?
Bill

Feb 20 '06 #3
CMM
Nonsense. Remoting is extraordinarily easy. It's insane how easy it is.

Without seeing your code there's no way to tell what you're doing wrong. Is
your remote class inheriting MarshalByRefObject, did you create a simple Exe
host or are you using IIS... lots of questions. Is the remote on a different
machine, is it firewalled?

I'd forget using a "sample" and create your own starting point by hand.
You'll learn a lot more.
http://www.thinktecture.com/Resource...Q/default.html
--
-C. Moya
www.cmoya.com
Feb 21 '06 #4
Absolutely agree with CMM. Remoting has some different concepts that a
beginner or even intermediate program might struggle with, but it is a
extremly good solution if you have to pass objects across different app
domains.

Also post your client code.

"CMM" wrote:
Nonsense. Remoting is extraordinarily easy. It's insane how easy it is.

Without seeing your code there's no way to tell what you're doing wrong. Is
your remote class inheriting MarshalByRefObject, did you create a simple Exe
host or are you using IIS... lots of questions. Is the remote on a different
machine, is it firewalled?

I'd forget using a "sample" and create your own starting point by hand.
You'll learn a lot more.
http://www.thinktecture.com/Resource...Q/default.html
--
-C. Moya
www.cmoya.com

Feb 21 '06 #5

<sw************@yahoo.com> wrote in message
news:11*********************@g44g2000cwa.googlegro ups.com...
Hello,
I am trying to build and run the Remoting Sample from MSDN. Everything
compiles. The Listener appears to run. The Client throws this
RemotingException:


Actually, the client is implicitly catching the exception and rethrowing it
:-)

(Haven't seen the example, but)
Are you using your own process to host the Remote Component, or IIS.

Is your remote Component added to the Global Assembly Cache or in
the same [application] directory as your host process?

Are you doing any of the remoting "work" yourself or just using

RemotingConfiguration.Configure()

and letting the Framework do it all for you?

Regards,
Phill W.
Feb 21 '06 #6
Thanks for the reference
Bill

CMM wrote:
Nonsense. Remoting is extraordinarily easy. It's insane how easy it is.

Without seeing your code there's no way to tell what you're doing wrong. Is
your remote class inheriting MarshalByRefObject, did you create a simple Exe
host or are you using IIS... lots of questions. Is the remote on a different
machine, is it firewalled?

I'd forget using a "sample" and create your own starting point by hand.
You'll learn a lot more.
http://www.thinktecture.com/Resource...Q/default.html
--
-C. Moya
www.cmoya.com


Feb 21 '06 #7
I am using my own process.
The remote component is not in the GAC.
I got rid of 'RemotingConfiguration.Configure()' and am getting
further.
I am starting over and making my own (component,server,client) sample.
I will repost new problems.
Bill

Feb 21 '06 #8
I now have a working simple (RemotableType,Listener,Client) sample. The
RemotableType resides in a DLL. Both the Listener and Client have
references to the DLL. I want to remove the Client dependency on the
DLL by using an interface I call IRemotable. RemotableType now
Implements the interface. I added IRemotable.vb to the Client. Now
'Activator.GetObject' appears to succeed, as does 'DirectCast' to cast
the Object to IRemotable. The first method call fails with this info:
RemotingException.Message
Cannot load type 'Client.IRemotable, Client, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null'.

How can I fix it?
Bill

sw************@yahoo.com wrote:
I am using my own process.
The remote component is not in the GAC.
I got rid of 'RemotingConfiguration.Configure()' and am getting
further.
I am starting over and making my own (component,server,client) sample.
I will repost new problems.
Bill


Feb 21 '06 #9
So, I am have the same problem... what sucks for me is that you did not post
your solution to the original problem. Could you post your working code. Once
I have remoting working properly I will need to implement an interface as you
described. But first things first, how did you solve your "Cannot load type"
problem?

"sw************@yahoo.com" wrote:
Hello,
I am trying to build and run the Remoting Sample from MSDN. Everything
compiles. The Listener appears to run. The Client throws this
RemotingException:

A first chance exception of type
'System.Runtime.Remoting.RemotingException' occurred in mscorlib.dll
RemotingException.Message
Cannot load type 'RemotableType, RemotableType'.
RemotingException.StackTrace

Server stack trace:
at
System.Runtime.Remoting.RemotingConfigHandler.Remo tingConfigInfo.LoadType(String
typeName, String assemblyName)
at
System.Runtime.Remoting.RemotingConfigHandler.Remo tingConfigInfo.GetServerTypeForUri(String
URI)
at
System.Runtime.Remoting.RemotingConfigHandler.GetS erverTypeForUri(String
URI)
at
System.Runtime.Remoting.RemotingServices.GetServer TypeForUri(String
URI)
at
System.Runtime.Remoting.Channels.SoapServerFormatt erSink.ProcessMessage(IServerChannelSinkStack
sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders,
Stream requestStream, IMessage& responseMsg, ITransportHeaders&
responseHeaders, Stream& responseStream)

Exception rethrown at [0]:
at
System.Runtime.Remoting.Proxies.RealProxy.HandleRe turnMessage(IMessage
reqMsg, IMessage retMsg)
at
System.Runtime.Remoting.Proxies.RealProxy.PrivateI nvoke(MessageData&
msgData, Int32 type)
at RemotableType.RemotableType.StringMethod()
at Client.Client.Form1_Load(Object sender, EventArgs e) in
C:\Documents and Settings\Owner\My Documents\Visual Studio
2005\Projects\RhsRemotingTest\Client\Client\Client .vb:line 13

Any ideas?
Bill

Apr 25 '06 #10

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

Similar topics

1
265
by: Catherine Jones | last post by:
Hello, The security sinks example provided as part of the below mentioned article in MSDN does not work in .NET 1.1. Can you please provide the configuration file for making this work with 1.1...
2
1890
by: Nick | last post by:
Is there a way that if I host my remoted object in IIS (not having to mess with encryption & authentication via a custom sink) that the server can raise events and the clients can detect them? If...
1
3953
by: Paul Fi | last post by:
I have this sample configuration file for a remoting app: <service> <wellknown mode="SingleCall" type="Microsoft.Samples.Runtime.Remoting.Security.Sample.Server.Foo,...
0
3821
by: Mike Grishaber | last post by:
Hello All, I am using an IHttpAsyncHandler class to intercept HTTP Requests and forward them to a system which processes the Request and returns the Result. I use .NET Remoting to connect the...
0
239
by: Nicolas | last post by:
Hi, I have a question concerning .NET Remoting. I walked through a couple of examples in books and on the internet concerning .NET Remoting and in every code sample I find the following code...
0
2401
by: Martijn Damen | last post by:
Hi, At the moment I am trying to develop an application that uses another app over .net remoting and having some problems with it (ok, that is ofcourse why I am here), hope somebody can shine a...
9
2088
by: Nak | last post by:
Hi there, I have been messing around with remoting in an attempt to create a "shared application" as mentioned in another thread by that name. I have created a singleton object just like the...
2
3739
by: Lonewolf | last post by:
hi all, I realize the example on MSDN for IPCChannel has compile error in VS2005 pro. Either I'm missing something or there's something seriously wrong with MSDN on that section. I reproduce the...
3
3400
by: Karthik D V | last post by:
Hi Friends, How do I upload files using remoting? Thanks
0
7225
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
7326
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
7383
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...
1
7046
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
7498
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
4707
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...
0
3182
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1557
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 ...
1
766
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.