473,657 Members | 2,801 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

remoting client -> interface based question

Tom
I have a question.. I am using remoting but on my client side I chose to use
an interface. As a result I was wondering if its still possible to place the
configuration details into a xml config file ?

I have not seen any examples of this does anyone know how I can do this ?
All I've seen are example such as below where an interface calling the
server as such. but I would like to not use this and instead call the config
file as its easily changed without the need to recompile

IRemotingExampl eService resService
=(IRemotingExam pleService)Acti vator.GetObject (

typeof(IRemotin gExampleService ),

"tcp://localhost:9988/RemotingExample Service");

Console.WriteLi ne("RESUME:\n" + resService.GetF ormattedResume( ));

Thanks

Tom
Nov 22 '05 #1
1 1418
Instead of using the remoting config on the client side (which apart from setting up channel/formatter combinations other than the defaults is only really used for redirecting new for a type - this doesn't work for interfaces) why not use the appSettings section

<configuratio n>
<appSettings>
<add key="URL" value="tcp://localhost:9988/RemotingExample Service"/>
</appSettings>
</configuration>

Then your code can look like this

string url = ConfigurationSe ttings.AppSetti ngs["URL"];
IRemotingExampl eService resService =(IRemotingExam pleService)Acti vator.GetObject ( typeof(IRemotin gExampleService ), url);
Console.WriteLi ne("RESUME:\n" + resService.GetF ormattedResume( ));

Regards

Richard Blewett - DevelopMentor
http://staff.develop.com/richardb/weblog

nntp://news.microsoft. com/microsoft.publi c.dotnet.langua ges.csharp/<41************ ***********@new s.optusnet.com. au>

I have a question.. I am using remoting but on my client side I chose to use
an interface. As a result I was wondering if its still possible to place the
configuration details into a xml config file ?

I have not seen any examples of this does anyone know how I can do this ?
All I've seen are example such as below where an interface calling the
server as such. but I would like to not use this and instead call the config
file as its easily changed without the need to recompile

IRemotingExampl eService resService
=(IRemotingExam pleService)Acti vator.GetObject (

typeof(IRemotin gExampleService ),

"tcp://localhost:9988/RemotingExample Service");

Console.WriteLi ne("RESUME:\n" + resService.GetF ormattedResume( ));

Thanks

Tom

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.770 / Virus Database: 517 - Release Date: 27/09/2004

[microsoft.publi c.dotnet.langua ges.csharp]
Nov 22 '05 #2

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

Similar topics

2
3931
by: Dicky Cheng | last post by:
Hi, I am using .net remoting technology. I set up a .net remoting client and server in IIS. When the client calls the server, the server will run a long duration method (30-60seconds). I have a test on it that if the network broken at the time the client have already send the remoting request and waiting for the server, the client side will wait infinitely by default, even if i already set the executionTimeout to 90seconds in...
3
4692
by: Deepal | last post by:
Hi; I'm doing an example program from a book regarding .NET Remoting. Both the Client and Server are C# Console Applications. Server Code is using System; using System.Runtime.Remoting; using System.Runtime.Remoting.Channels; using System.Runtime.Remoting.Channels.Tcp;
1
8972
by: vijay | last post by:
Hello I am learnign Dot NEt I have implemted 1. remote object 2.Listener 3.Client Listener started and listening to requests Client started and able to nstantiate remote object But when a Remote object method is invoked, following error happens
4
5798
by: GTi | last post by:
I have a program that will act as an Remoting server AND client. This program can be loaded on one macine or it can be loaded on several machines. But it will only be one master program available, all the other is "clients" handling tasks. The master program will dellegate tasks. When the program starts it will ask if there is any "master" available on the network (a BROADCAST to all machines). If there is no master responds it will...
0
2440
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 the other application. When I try to implement this in webforms, this unfortunately does not...
0
1426
by: MS Newsgroups | last post by:
Hi, I am trying to get my head around remoting. I have managed to configure the samples on MSDN and that is working fine. I have now tried to build my own remoting application to test this and i can't get the application to "Remote" basically what happens is that the client side uses the dll in the same directory instead of the remote one. I can test this by stopping the hosting application, and the client still works. I have a feeling...
4
2256
by: Sharon | last post by:
Hi, I'm using the remoting, and I have a remoting object that has a public event that other processes should register to it. But when the client process is registering to the remote event, it throw the following exception: System.Runtime.Serialization.SerializationException {“Cannot find the assembly Tester, Version=1.0.2164.27180, Culture=neutral, PublicKeyToken=null.”}
1
2826
by: Michael Bray | last post by:
Ok guys here's a tough one... I have a client/server application that uses remoting for communication. I am using Activator.GetObject to create a remoting instance with an URL that specifies the client machine by name. The *application* server in this case is the *remoting* client. In other words, the "application server" needs to talk to the "application client" to tell it that there is a new configuration available for it, and that...
9
8052
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'. RemotingException.StackTrace
6
2079
by: Palvinder Singh | last post by:
Hello google group peeps, I am new to remoting, but have a grasp of it. I am trying to create a server/client application, which will be deployed over an intranet. I have upwards of five clients that connect to a main server. The client application sets the state of several switchs (on/off by means of clicking a button). When a switch is turned on/off, its state is updated on the server, which will then raise an event to update...
0
8403
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, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
8316
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
8737
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...
1
8509
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
7345
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 projectplanning, coding, testing, and deploymentwithout 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
6174
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
4327
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2735
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
1967
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.