.Net Remoting -- Returning Database Generic Entities

Posts   
 
    
Posts: 4
Joined: 12-Mar-2005
# Posted on: 26-Mar-2005 00:41:19   

When I try to return database generic objects using .Net remoting, I get this error.

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidCastException: Object must implement IConvertible.

I've tried HTTP:Soap and TCP:Binary methods.

Thanks -- John E.

Devildog74
User
Posts: 719
Joined: 04-Feb-2004
# Posted on: 26-Mar-2005 03:25:26   

Need more details.

Posts: 4
Joined: 12-Mar-2005
# Posted on: 26-Mar-2005 07:04:10   

[SQL Server] | [.Net Remoting Object] | [Windows Gui]

Tools: LLBL 1.0.2003.1 Final Visual Studio 2002 SQL Server 2000

The Client and Server both have the Database generic entity dll's.

I load an entity via the adapter and attempt to return it to the front end. Int's and bool's make the trip succesfully. I also created a small [Serializable] object to send and it also worked. When I switch to the generated entity objects it throws the error above on the return statement of the server side.

I planned to pass the generated entity objects back and forth between the front and back via .Net remoting. It seems as though I am missing something here. From what I read, the objects should be ready for this type of duty.

Thanks -- John E.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39752
Joined: 17-Aug-2003
# Posted on: 26-Mar-2005 10:07:10   

1.0.2003.1 is a very old version but that one didn't have adapter, so I think you mean 1.0.2004.1 simple_smile . The error you get is due to a type mismatch if I'm not mistaken. It can be on the client you have a different version of the code than on the server. Also, because you use vs.net 2002, did you apply all service packs for .NET 1.0 on both client and server?

For testing purposes: if you serialize the object on the server into a memorystream object, does that work?

Frans Bouma | Lead developer LLBLGen Pro
Posts: 4
Joined: 12-Mar-2005
# Posted on: 26-Mar-2005 22:24:58   

I upgraded to Visual Studio 2003 and everything works ok now.

Thanks! Shawn