[Mono-list] remoting timeouts
Carlos Ble
carlosble at shidix.com
Tue Sep 27 05:38:49 EDT 2005
Hello,
I've thinking about howto process timeouts in remote calls throught remoting.
After some google searchs I change the communication channel from TcpChannel to
HttpChannel because I read that only this channel has timeout. I start my firewall
between client and server and timeout exception comes always about 100 seconds
(Unhandled Exception: System.Net.WebException: The request timed out), despite of
I am setting timeout property to 2 or 3 seconds.
This is the source code Im using at client:
IDictionary channelProperties = new Hashtable();
channelProperties["timeout"] = 2000; // 2 seconds
HttpChannel channel = new HttpChannel(channelProperties,
new SoapClientFormatterSinkProvider(),
new SoapServerFormatterSinkProvider());
Is timeout property really implemented in HttpChannel?
Will be implemented in TcpChannel ?
I also tryied another unsuccess solutions to control remote calls
(without freeze clients):
1. I've tryied asynchronous calls thought AsyncCallback, IAsyncResult...,
but between BeginInvoke and EndInvoke,
I have no control to abort call because the started thread looks like
internal, I cant access it, I can only ask IsCompleted ore WaitOne,
and get returned values but no stop.
Calling EndInvoke before remote call finish, only block main thread until
it finish.
2. I've tryied with System.Thread for launching remote call and abort thread
before end. This stop client but launchs remoting exceptions and doesnt looks
fine.
The last question is, why SOAPAction Header in HttpChannel communication starts
with http://schemas.microsoft.com/clr?. Why not to define mono schemas?
Thankyou very much, and sorry for my bad english
More information about the Mono-list
mailing list