[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.remoting

Setting the Remote Connection Timeout...

Jim Baron

9/1/2004 1:41:00 AM

I am attempting to configure the timeout period that my client application
will wait when initially attempting to connect to the server during
remoting. I have set my code as follows:

Hashtable properties = new Hashtable();
properties.Add("port", 0); // let system pick an open port
properties.Add("timeout", 20000); // 10 second timeout...
IClientChannelSinkProvider provider = new
BinaryClientFormatterSinkProvider();
provider.Next = new CompressedClientChannelSinkProvider();
HttpChannel channel = new HttpChannel(properties, provider, null);
channel.WantsToListen = false;
ChannelServices.RegisterChannel(channel);


However, adding the timeout property to the HttpChannel class provides no
change to the actual timeout period for a request if the server cannot be
found. Is there another way to set the timeout period that the client will
wait for a response from the server before moving on?/

Thanks,
Jim Baron