[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

microsoft.public.dotnet.framework.remoting

remoting client in IIS request server waiting permenantly when the network connection broken

Mouse

11/4/2004 6:32:00 AM

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 machine.config
and iis connection timeout. The performance counter shows that the request
current in client side will hold, and the thread will hold. Using netstat to
check the client connection that the connection is established to the server
side.

If client and server in a very unstable network environment and request goes
high, this problem will make the IIS (asp.net) reach the connection limit. I
use a workaround method to set the timeout by:

System.Runtime.Remoting.Channels.ChannelServices.GetChannelSinkProperties(se
rviceObjectInstance)["timeout"] = 30000; //30s timeout

My questions:

1. In my real case, the probability of the network connection broken is very
rare. So, I want to know any possible error will make the same situation in
client side?

2. Any method to set the timeout for all remoting object instance rather
than calling the above method everytime?

Many thanks,
Dicky Cheng


2 Answers

Mouse

11/4/2004 7:02:00 AM

0

More information:

my client side open a browser to browse a page in the client side (localhost
relative to the browser), there is a button that trigger remoting call from
client side to server side. If the connection broken when the client is
waiting the response from the remoting server, the browser will wait
infinitely. When the connection resume, the broswer still waiting, and i
click the button in the page again, it will make one more request and wait
inifinitely. I open a new browser in the client, and successfully get a
response from the server. I checked the netstat, notice that the client has
established connection in the server (even the connection broken between
them), this won't happen if i stop IIS service in server side (it will throw
underlying connection close).

So, I would like to know how remoting handle the mechanism in connection
between server and client?

Thanks,
Dicky Cheng


"Dicky Cheng" <xxx@xxx.com> wrote in message
news:%23VFqDgjwEHA.3908@TK2MSFTNGP12.phx.gbl...
> 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 machine.config
> and iis connection timeout. The performance counter shows that the request
> current in client side will hold, and the thread will hold. Using netstat
to
> check the client connection that the connection is established to the
server
> side.
>
> If client and server in a very unstable network environment and request
goes
> high, this problem will make the IIS (asp.net) reach the connection limit.
I
> use a workaround method to set the timeout by:
>
>
System.Runtime.Remoting.Channels.ChannelServices.GetChannelSinkProperties(se
> rviceObjectInstance)["timeout"] = 30000; //30s timeout
>
> My questions:
>
> 1. In my real case, the probability of the network connection broken is
very
> rare. So, I want to know any possible error will make the same situation
in
> client side?
>
> 2. Any method to set the timeout for all remoting object instance rather
> than calling the above method everytime?
>
> Many thanks,
> Dicky Cheng
>
>


Ken Kolda

11/4/2004 4:21:00 PM

0

The executionTimeout entry in the machine.config only affects the server
side -- it's the amount of time the ASP.NET runtime will allow the server
request before terminating it forcibly. As for setting the timeout on the
client, you don't have to do this for every object -- just set a property on
the HttpChannel when you create it. How that's done depends on whether you
configure your channel programmatically or via a config file. Either way,
check out:

http://msdn.microsoft.com/library/en-us/cpguide/html/cpconconfigu...

This file shows all the channel configuration properties and demonstrates
how to set them both within code and within a config file.

Ken



"Dicky Cheng" <xxx@xxx.com> wrote in message
news:%23VFqDgjwEHA.3908@TK2MSFTNGP12.phx.gbl...
> 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 machine.config
> and iis connection timeout. The performance counter shows that the request
> current in client side will hold, and the thread will hold. Using netstat
to
> check the client connection that the connection is established to the
server
> side.
>
> If client and server in a very unstable network environment and request
goes
> high, this problem will make the IIS (asp.net) reach the connection limit.
I
> use a workaround method to set the timeout by:
>
>
System.Runtime.Remoting.Channels.ChannelServices.GetChannelSinkProperties(se
> rviceObjectInstance)["timeout"] = 30000; //30s timeout
>
> My questions:
>
> 1. In my real case, the probability of the network connection broken is
very
> rare. So, I want to know any possible error will make the same situation
in
> client side?
>
> 2. Any method to set the timeout for all remoting object instance rather
> than calling the above method everytime?
>
> Many thanks,
> Dicky Cheng
>
>