Try my scenario and you will see that every .net remoting
call can hang up. So everybody who uses .net remoting to
other machine has this problem.
Read my test scenario:
I have a test application using .net remoting. The server
consists just with one Alive method for the test purpose. I
run a client test loop 5000 times and call just Alive method
of the server. Server and client are on different machines.
When I unplugged server network cable during a test loop I
can get infinite hang up of the client. The client never
finishes a call.
The client hangs up in Socket.Receive call of .net remoting
expecting result from the server. The client never finishes the
Receive. You can simulate it very easily (for me up to 7 tries
now). Just remember NOT to unplugged client because then
Windows media sensitive flag works and client gets an
exception from tcp stack.
Additionally if you plug server again then client would not
finish the call anyway. It can happen that your client is
stopped forever.
What can I do in order receive an exception rather than
infinite call? How can I finish the call (kill it)?
Thanks for hints,
Dalibor
Take a look here :
http://test.labdotnet.com/GenuineChannels/GenuineChannels.html
You can specify exactly timeout to wait for.
And you'll receive appropriate exception when such issue occurs.
Regards,
Dmitry.
"Dalibor Zliechovec" <dalibor.z...@frequentis.com> wrote in message
news:40f001c2f2b4$7f16f040$3401...@phx.gbl...
On the other hand I would prefer if I have everything in my
hands. It means that I would set up this timeout. I do not
need other nice things now from the GenuineChannels
component. And of course I worry if there is a problem inside
GenuineChannels the I would probably have to go to source
code (which is shipped with commercial version).
Do you know how GenuineChannels works internally? How
can I set up such a timeout?
Dalibor
joe robe
"Dalibor Zliechovec" <dalibor.z...@frequentis.com> wrote in message
news:356e01c2f2c9$52ec2070$a401...@phx.gbl...
Sorry for my delay.
Genuine Channels do everything in async manner. So receiving a response or
an exception is 100% guaranted.
Take a look at the Programming Guide which is available from the web-site.
But I think in your case my channels will give predictable results. Because
TCP channel will try to reconnect to the server as well as HTTP channel will
recover connection automatically.
So take a look at the global settings like
Belikov.GenuineChannels.Messaging.MessageManager.TimeSpanWaitReplyTimeOut
Belikov.GenuineChannels.Messaging.MessageManager.TimeSpanDeleteExpiredWaitin
gRecords
and
ReconnectionTries
SleepBetweenReconnection
MaxTimeSpanToReconnect
settings for the client TCP channel.
Also if you send me small example of your scenario with brief instructions,
I'll check it on my own.
My e-mail: dima...@mail.ru.
Regards,
Dmitry.
"Dalibor Zliechovec" <dalibor.z...@frequentis.com> wrote in message
news:356e01c2f2c9$52ec2070$a401...@phx.gbl...
Some advice to those trying to reproduce the problem: it will make it easier
and 100% reproducible if you add something like Thread.Sleep(10000) in the
method's implementation on the server and unplug the server while the client
is awaiting for the method to return...
Cheers
Alex
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!