473,769 Members | 4,202 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Remoting serialization exception??

1 New Member
I'm working on a remoting application where the client only references interfaces for all wellknown objects.

I currently have an object, Request being exposed:
Expand|Select|Wrap|Line Numbers
  1. Imports System.Runtime.Remoting
  2. Imports System.Runtime.Remoting.Channels
  3. Imports System.Runtime.Remoting.Channels.http
  4. Imports Central.Remotable
  5.  
  6. Public Class SyncService
  7.  
  8.    Protected Overrides Sub OnStart(ByVal args() As String)
  9.       Dim provider As New BinaryServerFormatterSinkProvider()
  10.       provider.TypeFilterLevel = Runtime.Serialization.Formatters.TypeFilterLevel.Full
  11.  
  12.       Dim props As New Hashtable()
  13.       props("port") = 8989
  14.  
  15.       Dim channel As HttpServerChannel = New HttpServerChannel(props, provider)
  16.       ChannelServices.RegisterChannel(channel, False)
  17.  
  18.       RemotingConfiguration.CustomErrorsMode = CustomErrorsModes.Off
  19.       RemotingConfiguration.RegisterWellKnownServiceType(GetType(Request), "Request", WellKnownObjectMode.Singleton)
  20.    End Sub
  21.  
  22.    Protected Overrides Sub OnStop()
  23.    End Sub
  24.  
  25. End Class
  26.  
And my client is configured (using XML) as so:
Expand|Select|Wrap|Line Numbers
  1.   <system.runtime.remoting>
  2.     <application>
  3.       <channels>
  4.         <channel ref="http">
  5.           <clientProviders>
  6.             <formatter ref="binary" typeFilterLevel="Full" />
  7.           </clientProviders>
  8.         </channel>
  9.       </channels>
  10.       <client>
  11.         <wellknown 
  12.           type="Central.Interface.Remotable.IRequest, Central.Interface"
  13.           url="http://localhost:8989/Request"
  14.          />
  15.       </client>
  16.     </application>
  17.   </system.runtime.remoting>
  18.  
The problem I'm running into is the Request object returns a structure in Central.Common. Structs that implements an interface in Central.Interfa ce. The client ONLY has a reference to the Central.Interfa ce class library and not the Central.Common. When I run the method on Request that returns the structure, I get a SerializationEx ception telling me that it cannot find the assembly Central.Common. Why would that exception be thrown when the client only points to the interface and expects an object of Central.Interfa ce.Structs.ISta rtReturnStruct?

If you need any more code/details, let me know. I posted a ton already and didn't want to clutter this up any more.

Thanks!
Sep 25 '07 #1
0 964

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1703
by: jan v | last post by:
Hi everyone I have a problem with events. When the code reaches communication.SynchronisationServer.UpdateNotificationEvent+=new Agilis.RAB.Server.BusinessLogic.SynchronisationDelegate(SynchronisationServer_UpdateNotificationEvent); communication.SynchronisationServer.UpdatedDataSenderEvent+=new Agilis.RAB.Server.BusinessLogic.SynchronisationDataSendingDelegate(SynchronisationServer_UpdatedDataSenderEvent); than it fires the...
6
2717
by: Uttam | last post by:
Hello, We are at a very crucial decision making stage to select between .Net and Java. Our requirement is to download a class at runtime on the client computer and execute it using remoting or rmi. Just to keep my question short I am posting trimmed version of my code. //file: Serializable.cs
3
3076
by: Skip | last post by:
Hi, I'm new to .NET remoting and there's something I'm having real trouble with. Basically, I'd like to create a component that can act as a server and as a client (can send messages and receive them in asynchronous mode). Here's the situation just so you guys understand why I'm doing this (and maybe so that you can provide me with other options): I have an application that needs to save data to a remote database. The
15
5753
by: Sharon | last post by:
I’m trying to build a generic Publisher-Subscriber that will work over the net, so I’m using the Remoting. I wish that the subscriber user will be notify about the messages sent by the remote publisher, so I used delegate that the user will be able to set on it his own function for that purpuse. The trouble is that this delegate must not be static because there may be many subscribers, and each subscriber may have different...
4
3118
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()
11
11961
by: ajou_king | last post by:
I was running some tests on my Win32 1GHZ processor to see how long it would take to transmit objects numerous times via TCP/IP using C# ..NET Remoting vs the C++ trustworthy method of binary streams. I ran the test for 50K, 100K, 500K iterations, where each iteration consists of sending an object from a client process to a server process, and the server process sends back an ack. Here are the results: .NET Remoting C++...
3
2876
by: Steve | last post by:
I've been following a couple remoting tutorials on the web, they are all pretty much the same. I've got my different applications built(client, server and remote object (dll)) The client is able to get a reference to the remote object and that works fine. When I try to make a call to a remote object's method I get an exception: System.Runtime.Serialization.SerializationException: Cannot find the assembly ProcessTest,...
1
1366
by: Dan Holmes | last post by:
I traced this all the to the domain boundary. I also but a breakpoint in the server. That was never hit. It happens after it leaves the client but before it calls into the "add" method in the server. I don't know how to debug this any further. exact error message and code follows this is what fails. it fails on the add. TestContactInfo tci = new TestContactInfo(); tci.Address1 = "address1";
2
372
by: Jayme.Pechan | last post by:
I realize this is a complicated scenerio to explain so hopefully it will make sense. I have an object that I create an instance of on a remote server. I can call functions on this object with no problem but one of the things that I'd like to do is create an instance of a different object on my local server and pass the reference to the remote server object as a parameter which in turn would occasionally call functions on this new local...
3
2162
by: benkial | last post by:
Below is a custom exception class that I created to be shared by my C+ + and C# code. It works fine till I need to pass the exception object through Remoting: every time a FtException is raized in the Remoting server side, the client got the following error (see below). Based on my Google search, I did the best I can to have a constructor that takes SerializationInfo and StreamingContext as input. But it seemed that client side still...
0
9423
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
10219
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10049
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
8876
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7413
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6675
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
5310
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...
1
3967
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
3567
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.