473,405 Members | 2,300 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Remote call to server takes too long if network is not available (.NET Remoting)

Hi all,

I am developing a Client-Server based application using .NET Remoting.

First server is available and client logged in to the server successfully and communicate with the server successfully. Suddenly network cable of Server is unplugged and it is not more available on network. When client calls a function of server remotely, it takes about 1-2 minutes until client receives SocketException. Is there any way to reduce this wait time?

Thanks
Aug 8 '07 #1
3 2030
try

My.Computer.Network.IsAvailable ()

it returns a boolean value.
Aug 8 '07 #2
Plater
7,872 Expert 4TB
There are a number of socket options you can try to speed up the process, but I've never found a consistant set of them to "always" work.
Things like connection/send/receive timeouts.
linger state, routing options.
All can be set in socket options. Have to dig for which ones you want though.
Aug 8 '07 #3
Hallo,

How can I configure these socket options in .NET Remoting? May be my problem is not much clear that why I would like to explain my problem in more detail.
I am using .NET remoting to develop a server and a client . Server also requests the services of client, that means client also acts as server and server as client.

Picture of whole scenario
~~~~~~~~~~~~~~~~~~
When client requests server for login, he also supplies reference to a remote object for callback(Created in client and passed to server for callback). Server notes the reference of this object. Communication works without any problem. But when I unplug the cable of client and server tries to call method of client's remote object, then it takes too long until server receives SocketException.

Config file of server
~~~~~~~~~~~~~~

<configuration>
<configSections>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGrou p, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="Server.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</sectionGroup>
</configSections>

<system.runtime.remoting>
<application>
<lifetime leaseTime="30D" renewOnCallTime="30D"/>
<channels>
<channel ref="tcp" port="1234">
<serverProviders>
<formatter ref="binary" typeFilterLevel="Full" />
</serverProviders>
<clientProviders>
<formatter ref="binary" />
</clientProviders>
</channel>
</channels>

<service>
<wellknown mode="SingleCall" type="Server.Server, IMServer" objectUri="Server.rem" />
</service>
</application>
</system.runtime.remoting>
</configuration>

~~~~~~~~~~~~~~~~
Client Configurationfile
~~~~~~~~~~~~~~~~

<configuration>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="Client.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
</sectionGroup>
</configSections>


<system.runtime.remoting>
<application>
<lifetime leaseTime="30D" renewOnCallTime="30D"/>
<channels>
<channel ref="tcp" port="0">
<serverProviders>
<formatter ref="binary" typeFilterLevel="Full" />
</serverProviders>
<clientProviders>
<formatter ref="binary" />
</clientProviders>
</channel>
</channels>

<client>
<wellknown type="General.IServer, IMGeneral" url="tcp://localhost:1234/Server.rem"/>
</client>
</application>
</system.runtime.remoting>

</configuration>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Creation of remote object of Client for callback
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

clientEvents = new ClientEvents();

~~~~~~~~~~~~~~~~~~~~~~~
Pass it to server while loging in.
~~~~~~~~~~~~~~~~~~~~~~~
server.LogOn(..... clientEvents, ...)

Server stores its reference and call functions of it. It works very nice but when I unplug the cable of client computer and server tries ot call the function of this client using the object "clientEvents", then it takes too long until it receives SocketException. How can I reduce the time the server waits when client is not available on the network.

Thanks
Aug 9 '07 #4

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

Similar topics

2
by: Danny J. Lesandrini | last post by:
Our orders database exists inside our firewall but we have a web site hosted on an ISP server. If we wanted to give users the ability to query the status of their order in real time, we could just...
0
by: Rade | last post by:
in .Net remoting, I can get the Remote Object Name, Type, MethodName, Parameters. all in string format. How can I construct a MethodCall? Can I manage it using Object MethodCall? and How? or any...
2
by: gemel | last post by:
Up until now I have been developing my ASP .NET web applications on the same machine as the client and then using 'Copy Project' or Web Setup to transfer the application.. This also included the...
1
by: Terry Olsen | last post by:
Running VS.NET 2003 on WinXP pro. Created ASP.NET Web App on remote Win2003 Server. Installed remote debugging tools on server. When I try to run the app, I get the following error. "Error...
6
by: Philip Lee | last post by:
Dear all, How can I access files in remote file server through my ASP.NET application only, but deny all other users? I have added <identity impersonate="true" userName="test"...
0
by: tamayi | last post by:
I have a problem (like most others posting issues on this forum :) ) I have a remote server running Windows XP SP2, with both SQL Server 2005 Express with Advanced Features and SQL 2000...
1
by: DR | last post by:
How to debug sql 2005 on remote machine. I am administrator on both my dev machine and remote sql server machine. I get this error when i try to connect to remote machien with visual studio: ...
11
by: JCav | last post by:
I need to call a COM object from a remote machine using C#. I also need to pass on a different userID and password to the call. Has anyone done this? I've used Java to do this using JIntegra, but...
3
by: almurph | last post by:
Hi everyone, Hope you can help me with this one. We are doing a batch process on both a local server and remote. By local I mean the db server is on the same box and by remote I mean the db...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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...
0
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...
0
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,...

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.