HighTechTalks DotNet Forums  

MSDN .Net Remoting Sample ?

VB.net microsoft.public.dotnet.languages.vb


Discuss MSDN .Net Remoting Sample ? in the VB.net forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
AT
 
Posts: n/a

Default MSDN .Net Remoting Sample ? - 02-20-2006 , 11:41 AM






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


Reply With Quote
  #2  
Old   
gregory_may
 
Posts: n/a

Default Re: MSDN .Net Remoting Sample ? - 02-20-2006 , 02:09 PM






My suggestion is not to use remoting.

I have done some work with it ... I would look into Indigo, Windows
Communication Foundation instead.


<swartzbill2000 (AT) yahoo (DOT) com> wrote

Quote:
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




Reply With Quote
  #3  
Old   
AT
 
Posts: n/a

Default Re: MSDN .Net Remoting Sample ? - 02-20-2006 , 04:35 PM



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


Reply With Quote
  #4  
Old   
CMM
 
Posts: n/a

Default Re: MSDN .Net Remoting Sample ? - 02-20-2006 , 08:40 PM



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/Resources/RemotingFAQ/default.html


--
-C. Moya
www.cmoya.com



Reply With Quote
  #5  
Old   
Denny
 
Posts: n/a

Default Re: MSDN .Net Remoting Sample ? - 02-20-2006 , 10:31 PM



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:

Quote:
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/Resources/RemotingFAQ/default.html


--
-C. Moya
www.cmoya.com




Reply With Quote
  #6  
Old   
Phill W.
 
Posts: n/a

Default Re: MSDN .Net Remoting Sample ? - 02-21-2006 , 08:49 AM




<swartzbill2000 (AT) yahoo (DOT) com> wrote

Quote:
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.




Reply With Quote
  #7  
Old   
AT
 
Posts: n/a

Default Re: MSDN .Net Remoting Sample ? - 02-21-2006 , 09:33 AM



Thanks for the reference
Bill

CMM wrote:
Quote:
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/Resources/RemotingFAQ/default.html


--
-C. Moya
www.cmoya.com


Reply With Quote
  #8  
Old   
AT
 
Posts: n/a

Default Re: MSDN .Net Remoting Sample ? - 02-21-2006 , 09:36 AM



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


Reply With Quote
  #9  
Old   
AT
 
Posts: n/a

Default Re: MSDN .Net Remoting Sample ? - 02-21-2006 , 02:58 PM



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

swartzbill2000 (AT) yahoo (DOT) com wrote:
Quote:
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


Reply With Quote
  #10  
Old   
machcoder
 
Posts: n/a

Default RE: MSDN .Net Remoting Sample ? - 04-25-2006 , 02:11 AM



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?

"swartzbill2000 (AT) yahoo (DOT) com" wrote:

Quote:
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



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.