[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.remoting

System.InvalidCastException: Return argument has an invalid type.

Robin Prosch via .NET 247

6/9/2004 7:01:00 PM

Hello,

I currently have this application based on remoting and some udp/tcp programming. I sort off followed Ingo Rammer's shared assembly technique (in my solution I use an abstract class though) where client and server reference an assembly with metadata about the remoted object. Problem I'm having is that when I expose the remoted object on my computer everything works fine. All clients get their data as they are supposed to. Now, whenever I host the Windows Service (which exposes the remoted object) elsewhere i am getting this error.

System.InvalidCastException: Return argument has an invalid type.
at System.Runtime.Remoting.Proxies.RealProxy.ValidateReturnArg(Object arg, Type paramType)
at System.Runtime.Remoting.Proxies.RealProxy.PropagateOutParameters(IMessage msg, Object[] outArgs, Object returnValue)
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at SharedAssembly.CoordinatorBase.userInfo(Int32 usrID)
at Interactive_To_Do.frmMain.LoadDataSet() in C:\Documents and Settings\jcandal\My Documents\Visual Studio Projects\Interactive to Do\ITD Client\Interactive To Do\frmMain.vb:line 715" String

The weird thing is that when I host the service on my computer clients dont' throw this exception. When I install the services elsewhere it works on some computers and in others not (Also adding to the strangeness, some computers dont get this error while others do). I don't know how to let you guys help me without disclosing sensitive information (This app is for comercial distribution). Maybe one of you has experienced this and may be able to help me.

-----------------------
Posted by a user from .NET 247 (http://www.dotn...)

<Id>MQbIUm1ez0Oy+ebJm2sp9A==</Id>