473,581 Members | 2,757 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Remoting Problem

I have a simple remote server object that raises an event when the list
maintined by it changes. The idea is to enable the remote client to
update the GUI when the server list changes. When the I create the
server object without using remoting (i.e. just use new()) the event
fires and the client updates the UI but when I create the server object
as a remote object (using Activator.GetOb ject()) the event does not
fire at all. I have pasted the code below. I am pulling my hair out
trying to solve this simple problem. Any help will be much appreciated.
Thank you.

=============== =============== =============== ======
Source Code from Remoting Host ( Console App)
=============== =============== =============== ======

// Configure the Remoting Infrastructure
BinaryServerFor matterSinkProvi der provider = new
BinaryServerFor matterSinkProvi der();
provider.TypeFi lterLevel =
System.Runtime. Serialization.F ormatters.TypeF ilterLevel.Full ;
Hashtable props = new Hashtable();
props["port"] = Facade.Remoting Parameters.PORT ;

// Register Channel first
System.Runtime. Remoting.Channe ls.Tcp.TcpServe rChannel channel = new
System.Runtime. Remoting.Channe ls.Tcp.TcpServe rChannel(props, provider);
System.Runtime. Remoting.Channe ls.ChannelServi ces.RegisterCha nnel(channel,fa lse);

// Use Server Activated and Singleton as the object mode
System.Type remoteType = typeof(Business Layer.Services) ;
RemotingConfigu ration.Register WellKnownServic eType(remoteTyp e ,
Facade.Remoting Parameters.URI,
WellKnownObject Mode.Singleton) ;

=============== =============== =============== ======
Source Code from Remoting Client (System.Windows .Forms App)
=============== =============== =============== ======

// Register a Channel for Event Handler purposes.
ChannelServices .RegisterChanne l(new TcpClientChanne l(), false);

// Create the remote object
this._services =
(Facade.IServic es)Activator.Ge tObject(typeof( Facade.IService s),
this._txtServer .Text);

// Add Event Handler
this._eventRepe ater = new Facade.EventRep eater();
this._eventRepe ater.ListChange d += this.ListChange dEventHandler;
this._services. ListChanged += _eventRepeater. ListChangedEven tHandler;

Mar 6 '06 #1
3 1501
Is it possible that your Singleton server object is expiring? Have you
looked into the InitializeLifet imeService() method of
MarshalByRefObj ect?

-Alan

Mar 6 '06 #2
I just pulled up some code I wrote a few years back that did what
you're trying to accomplish. I used a TcpChannel at port 0 on my client
instead of a TcpClientChanne l. On my server, I had the
InitializeLifet imeService method overridden as follows:

public override object InitializeLifet imeService()
{
return null;
}

Mar 6 '06 #3

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

Similar topics

0
1896
by: bettervssremoting | last post by:
To view the full article, please visit http://www.BetterVssRemoting.com Better VSS Remote Access Tool This article makes a detailed comparison among SourceAnyWhere, SourceOffSite, VSS Remoting and possible others. Keywords: VSS Remote Access, VSS Web Access, VSS Internet Access,
5
5676
by: mayamorning123 | last post by:
A comparison among six VSS remote tools including SourceOffSite , SourceAnyWhere, VSS Connect, SourceXT, VSS Remoting, VSS.NET To view the full article, please visit http://www.BetterVssRemoting.com Better VSS Remote Access Tool This article makes a detailed comparison among SourceAnyWhere 4.0, SourceOffSite 4.1, VSS Connect 1.5,...
0
3281
by: bettervssremoting | last post by:
To view the full article, please visit http://www.BetterVssRemoting.com Better VSS Remote Access Tool including SourceOffSite, SourceAnyWhere and VSS Remoting This article makes a detailed comparison among SourceAnyWhere, SourceOffSite, VSS Remoting and possible others.
1
2685
by: David Krmpotic | last post by:
Hi All! I have a .NET remoting Client-Server application with Server Activated Objects only.. something is worrying me.. sometimes (rarely), I can't connect to the server although it is running. I get the exception saying "A socket operation was attempted to an unreachable host".. it means that it behaves the same as if the server
0
1416
by: bettervssremoting | last post by:
To view the full article, please visit http://www.BetterVssRemoting.com Better VSS Remote Access Tool This article makes a detailed comparison among SourceAnyWhere, SourceOffSite, VSS Remoting and possible others. Keywords: VSS Remote Access, VSS Web Access, VSS Internet Access,
0
2423
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 light on the following: I have been given a sample winforms app, which works without problem, I can connect, send queries and become response from...
5
1902
by: LGHummel | last post by:
I'm trying to host a remoting app in IIS and am getting the following error: Failed to execute the request because the ASP.NET process identity does not have read permissions to the global assembly cache. Error: 0x80070005 Access is denied. I tried adding ASPNET to the Administrators group with no success. The error is preceded by the...
9
8050
by: swartzbill2000 | last post by:
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'....
1
2074
by: Thomee Wright | last post by:
I'm having a problem with a pair of applications I'm developing. I have a server application which interacts with several instruments, and a client app which connects to the server and provides a UI for interacting with the instruments. Readings from the instruments are periodically sent to the clients, and clients will send commands to the...
0
3394
by: Kristian Reukauff | last post by:
Hi I have a problem with the .Net-Securty-Functions. I've got a client and a server. When I try to register a channel at the server with this line: ChannelServices.RegisterChannel(chan, false); I get the following error - doesn't matter if I try it local from my machine or from a remote machine. (After the Errormessage is more text ;))
0
7876
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8156
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. ...
1
7910
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8180
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5681
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...
0
5366
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...
0
3832
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2307
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
0
1144
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.